Mercurial > hg > CbC > CbC_gcc
diff gcc/config/sol2-c.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | f6334be47118 |
children | 84e7813d76e9 |
line wrap: on
line diff
--- a/gcc/config/sol2-c.c Sun Aug 21 07:07:55 2011 +0900 +++ b/gcc/config/sol2-c.c Fri Oct 27 22:46:09 2017 +0900 @@ -1,5 +1,5 @@ /* Solaris support needed only by C/C++ frontends. - Copyright (C) 2004, 2005, 2007, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2004-2017 Free Software Foundation, Inc. Contributed by CodeSourcery, LLC. This file is part of GCC. @@ -21,16 +21,15 @@ #include "config.h" #include "system.h" #include "coretypes.h" -#include "tree.h" #include "tm.h" -#include "tm_p.h" +#include "c-family/c-common.h" +#include "stringpool.h" +#include "attribs.h" #include "c-family/c-format.h" #include "intl.h" -#include "cpplib.h" #include "c-family/c-pragma.h" -#include "c-family/c-common.h" /* cmn_err only accepts "l" and "ll". */ static const format_length_info cmn_err_length_specs[] = @@ -41,9 +40,9 @@ static const format_flag_spec cmn_err_flag_specs[] = { - { 'w', 0, 0, N_("field width"), N_("field width in printf format"), STD_C89 }, - { 'L', 0, 0, N_("length modifier"), N_("length modifier in printf format"), STD_C89 }, - { 0, 0, 0, NULL, NULL, STD_C89 } + { 'w', 0, 0, 0, N_("field width"), N_("field width in printf format"), STD_C89 }, + { 'L', 0, 0, 0, N_("length modifier"), N_("length modifier in printf format"), STD_C89 }, + { 0, 0, 0, 0, NULL, NULL, STD_C89 } }; @@ -68,7 +67,7 @@ { NULL, 0, STD_C89, NOLENGTHS, NULL, NULL, NULL } }; -const format_kind_info solaris_format_types[] = { +EXPORTED_CONST format_kind_info solaris_format_types[] = { { "cmn_err", cmn_err_length_specs, cmn_err_char_table, "", NULL, cmn_err_flag_specs, cmn_err_flag_pairs, FMT_FLAG_ARG_CONVERT|FMT_FLAG_EMPTY_PREC_OK, @@ -84,7 +83,7 @@ { tree t, x; enum cpp_ttype ttype; - HOST_WIDE_INT low; + unsigned HOST_WIDE_INT low; if (pragma_lex (&x) != CPP_NUMBER || pragma_lex (&t) != CPP_OPEN_PAREN) @@ -94,7 +93,7 @@ } low = TREE_INT_CST_LOW (x); - if (TREE_INT_CST_HIGH (x) != 0 + if (!tree_fits_uhwi_p (x) || (low != 1 && low != 2 && low != 4 && low != 8 && low != 16 && low != 32 && low != 64 && low != 128)) { @@ -114,7 +113,7 @@ tree decl = identifier_global_value (t); if (decl && DECL_P (decl)) warning (0, "%<#pragma align%> must appear before the declaration of " - "%D, ignoring", decl); + "%qD, ignoring", decl); else solaris_pending_aligns = tree_cons (t, build_tree_list (NULL, x), solaris_pending_aligns);