diff options
Diffstat (limited to 'lang/gcc48/files/patch-fa')
-rw-r--r-- | lang/gcc48/files/patch-fa | 142 |
1 files changed, 81 insertions, 61 deletions
diff --git a/lang/gcc48/files/patch-fa b/lang/gcc48/files/patch-fa index b85b8f989c31..55221295f0b7 100644 --- a/lang/gcc48/files/patch-fa +++ b/lang/gcc48/files/patch-fa @@ -1,6 +1,6 @@ ---- gcc/c-common.c.orig Sun Jun 18 06:09:26 2000 -+++ gcc/c-common.c Mon Jun 26 20:15:08 2000 -@@ -154,7 +154,7 @@ +--- gcc/c-common.c.orig Fri Aug 25 08:27:55 2000 ++++ gcc/c-common.c Fri Sep 15 11:30:42 2000 +@@ -157,7 +157,7 @@ int, int, int)); static void init_attributes PARAMS ((void)); static void record_function_format PARAMS ((tree, tree, enum format_type, @@ -9,7 +9,7 @@ static void record_international_format PARAMS ((tree, tree, int)); static int default_valid_lang_attribute PARAMS ((tree, tree, tree, tree)); -@@ -805,6 +805,7 @@ +@@ -827,6 +827,7 @@ enum format_type format_type; tree argument; unsigned int arg_num; @@ -17,7 +17,7 @@ if (TREE_CODE (decl) != FUNCTION_DECL) { -@@ -815,7 +816,7 @@ +@@ -837,7 +838,7 @@ if (TREE_CODE (format_type_id) != IDENTIFIER_NODE) { @@ -26,7 +26,7 @@ continue; } else -@@ -823,12 +824,26 @@ +@@ -845,12 +846,26 @@ const char *p = IDENTIFIER_POINTER (format_type_id); if (!strcmp (p, "printf") || !strcmp (p, "__printf__")) @@ -53,7 +53,7 @@ else { warning ("`%s' is an unrecognized format function type", p); -@@ -901,7 +916,8 @@ +@@ -923,7 +938,8 @@ record_function_format (DECL_NAME (decl), DECL_ASSEMBLER_NAME (decl), @@ -63,7 +63,7 @@ break; } -@@ -1207,6 +1223,11 @@ +@@ -1242,6 +1258,11 @@ } format_char_info; static format_char_info print_char_table[] = { @@ -72,10 +72,10 @@ + { "b", 1, T_C, T_C, NULL, NULL, NULL, NULL, NULL, "-wp" }, + { "rz", 0, NULL, T_I, T_I, T_L, NULL, NULL, NULL, "-wp0 +#" }, +#define unextended_print_char_table (print_char_table + 3) - { "di", 0, T_I, T_I, T_I, T_L, T_LL, T_LL, T_ST, "-wp0 +" }, - { "oxX", 0, T_UI, T_UI, T_UI, T_UL, T_ULL, T_ULL, T_ST, "-wp0#" }, - { "u", 0, T_UI, T_UI, T_UI, T_UL, T_ULL, T_ULL, T_ST, "-wp0" }, -@@ -1269,6 +1290,7 @@ + { "di", 0, T_I, T_I, T_I, T_L, T_LL, T_LL, T_SST, T_PD, T_IM, "-wp0 +'I" }, + { "oxX", 0, T_UI, T_UI, T_UI, T_UL, T_ULL, T_ULL, T_ST, T_UPD, T_UIM, "-wp0#" }, + { "u", 0, T_UI, T_UI, T_UI, T_UL, T_ULL, T_ULL, T_ST, T_UPD, T_UIM, "-wp0'I" }, +@@ -1314,6 +1335,7 @@ enum format_type format_type; /* type of format (printf, scanf, etc.) */ int format_num; /* number of format argument */ int first_arg_num; /* number of first arg (zero for varargs) */ @@ -83,43 +83,63 @@ } function_format_info; static function_format_info *function_format_list = NULL; -@@ -1299,25 +1321,25 @@ - init_function_format_info () - { - record_function_format (get_identifier ("printf"), NULL_TREE, -- printf_format_type, 1, 2); -+ printf_format_type, 1, 2, 0); - record_function_format (get_identifier ("fprintf"), NULL_TREE, -- printf_format_type, 2, 3); -+ printf_format_type, 2, 3, 0); - record_function_format (get_identifier ("sprintf"), NULL_TREE, -- printf_format_type, 2, 3); -+ printf_format_type, 2, 3, 0); - record_function_format (get_identifier ("scanf"), NULL_TREE, -- scanf_format_type, 1, 2); -+ scanf_format_type, 1, 2, 0); - record_function_format (get_identifier ("fscanf"), NULL_TREE, -- scanf_format_type, 2, 3); -+ scanf_format_type, 2, 3, 0); - record_function_format (get_identifier ("sscanf"), NULL_TREE, -- scanf_format_type, 2, 3); -+ scanf_format_type, 2, 3, 0); - record_function_format (get_identifier ("vprintf"), NULL_TREE, -- printf_format_type, 1, 0); -+ printf_format_type, 1, 0, 0); - record_function_format (get_identifier ("vfprintf"), NULL_TREE, -- printf_format_type, 2, 0); -+ printf_format_type, 2, 0, 0); - record_function_format (get_identifier ("vsprintf"), NULL_TREE, -- printf_format_type, 2, 0); -+ printf_format_type, 2, 0, 0); - record_function_format (get_identifier ("strftime"), NULL_TREE, -- strftime_format_type, 3, 0); -+ strftime_format_type, 3, 0, 0); - - record_international_format (get_identifier ("gettext"), NULL_TREE, 1); - record_international_format (get_identifier ("dgettext"), NULL_TREE, 2); -@@ -1335,12 +1357,13 @@ +@@ -1354,40 +1376,40 @@ + { + /* Functions from ISO/IEC 9899:1990. */ + record_function_format (get_identifier ("printf"), NULL_TREE, +- printf_format_type, 1, 2); ++ printf_format_type, 1, 2, 0); + record_function_format (get_identifier ("fprintf"), NULL_TREE, +- printf_format_type, 2, 3); ++ printf_format_type, 2, 3, 0); + record_function_format (get_identifier ("sprintf"), NULL_TREE, +- printf_format_type, 2, 3); ++ printf_format_type, 2, 3, 0); + record_function_format (get_identifier ("scanf"), NULL_TREE, +- scanf_format_type, 1, 2); ++ scanf_format_type, 1, 2, 0); + record_function_format (get_identifier ("fscanf"), NULL_TREE, +- scanf_format_type, 2, 3); ++ scanf_format_type, 2, 3, 0); + record_function_format (get_identifier ("sscanf"), NULL_TREE, +- scanf_format_type, 2, 3); ++ scanf_format_type, 2, 3, 0); + record_function_format (get_identifier ("vprintf"), NULL_TREE, +- printf_format_type, 1, 0); ++ printf_format_type, 1, 0, 0); + record_function_format (get_identifier ("vfprintf"), NULL_TREE, +- printf_format_type, 2, 0); ++ printf_format_type, 2, 0, 0); + record_function_format (get_identifier ("vsprintf"), NULL_TREE, +- printf_format_type, 2, 0); ++ printf_format_type, 2, 0, 0); + record_function_format (get_identifier ("strftime"), NULL_TREE, +- strftime_format_type, 3, 0); ++ strftime_format_type, 3, 0, 0); + } + + if (flag_hosted && flag_isoc99) + { + /* ISO C99 adds the snprintf and vscanf family functions. */ + record_function_format (get_identifier ("snprintf"), NULL_TREE, +- printf_format_type, 3, 4); ++ printf_format_type, 3, 4, 0); + record_function_format (get_identifier ("vsnprintf"), NULL_TREE, +- printf_format_type, 3, 0); ++ printf_format_type, 3, 0, 0); + record_function_format (get_identifier ("vscanf"), NULL_TREE, +- scanf_format_type, 1, 0); ++ scanf_format_type, 1, 0, 0); + record_function_format (get_identifier ("vfscanf"), NULL_TREE, +- scanf_format_type, 2, 0); ++ scanf_format_type, 2, 0, 0); + record_function_format (get_identifier ("vsscanf"), NULL_TREE, +- scanf_format_type, 2, 0); ++ scanf_format_type, 2, 0, 0); + } + + if (flag_hosted && flag_noniso_default_format_attributes) +@@ -1410,12 +1432,13 @@ static void record_function_format (name, assembler_name, format_type, @@ -134,7 +154,7 @@ { function_format_info *info; -@@ -1364,6 +1387,7 @@ +@@ -1439,6 +1462,7 @@ info->format_type = format_type; info->format_num = format_num; info->first_arg_num = first_arg_num; @@ -142,7 +162,7 @@ } /* Record information for the names of function that modify the format -@@ -1515,7 +1539,8 @@ +@@ -1755,7 +1779,8 @@ if (integer_zerop (format_tree)) { @@ -152,7 +172,7 @@ return; } if (TREE_CODE (format_tree) != ADDR_EXPR) -@@ -1704,12 +1729,13 @@ +@@ -1981,12 +2006,13 @@ It will work on most machines, because size_t and int have the same mode. But might as well warn anyway, since it will fail on other machines. */ @@ -167,7 +187,7 @@ } } else -@@ -1754,6 +1780,53 @@ +@@ -2046,6 +2072,53 @@ } } } @@ -221,7 +241,7 @@ aflag = 0; -@@ -1822,7 +1895,8 @@ +@@ -2130,7 +2203,8 @@ switch (info->format_type) { case printf_format_type: @@ -231,12 +251,12 @@ break; case scanf_format_type: fci = scan_char_table; -@@ -1859,7 +1933,7 @@ - if (index (fci->flag_chars, '2') != 0) - warning ("`%%%c' yields only last 2 digits of year", format_char); - else if (index (fci->flag_chars, '3') != 0) +@@ -2174,7 +2248,7 @@ + warning ("width used with `%c' format", format_char); + if (index (fci->flag_chars, '3') != 0 + || (format_char == 'y' && index (flag_chars, 'E'))) - warning ("`%%%c' yields only last 2 digits of year in some locales", -+ warning ("`%%%c' yields only last 2 digits of year in some locales on non-BSD systems", ++ warning ("`%%%c' yields only last 2 digits of year in some locales on non-BSD systems", format_char); - if (precise && index (fci->flag_chars, 'p') == 0) - warning ("precision used with `%c' format", format_char); + else if (index (fci->flag_chars, '2') != 0) + warning ("`%%%c' yields only last 2 digits of year", format_char); |