diff options
author | Jeff Law <law@gcc.gnu.org> | 1998-04-04 06:32:39 -0700 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1998-04-04 06:32:39 -0700 |
commit | e5e809f4194e578b5fbd48fc5a1df2377f28d197 (patch) | |
tree | 6743f11e58bd7a933b08900d973d89026cd11c43 /gcc/c-common.c | |
parent | 31031eddacda46a500b2390f52cd4474bcaf84ca (diff) | |
download | gcc-e5e809f4194e578b5fbd48fc5a1df2377f28d197.zip gcc-e5e809f4194e578b5fbd48fc5a1df2377f28d197.tar.gz gcc-e5e809f4194e578b5fbd48fc5a1df2377f28d197.tar.bz2 |
* Check in merge from gcc2. See ChangeLog.11 and ChangeLog.12
for details.
* haifa-sched.c: Mirror recent changes from gcc2.
From-SVN: r18984
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r-- | gcc/c-common.c | 57 |
1 files changed, 33 insertions, 24 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c index efc6051..2422741 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -1,5 +1,5 @@ /* Subroutines shared by all languages that are variants of C. - Copyright (C) 1992, 93, 94, 95, 96, 1997 Free Software Foundation, Inc. + Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc. This file is part of GNU CC. @@ -975,37 +975,39 @@ typedef struct { /* Type of argument if length modifier `L' is used. If NULL, then this modifier is not allowed. */ tree *bigllen; + /* Type of argument if length modifier `Z' is used. + If NULL, then this modifier is not allowed. */ + tree *zlen; /* List of other modifier characters allowed with these options. */ char *flag_chars; } format_char_info; static format_char_info print_char_table[] = { - { "di", 0, T_I, T_I, T_L, T_LL, T_LL, "-wp0 +" }, - { "oxX", 0, T_UI, T_UI, T_UL, T_ULL, T_ULL, "-wp0#" }, - { "u", 0, T_UI, T_UI, T_UL, T_ULL, T_ULL, "-wp0" }, -/* Two GNU extensions. */ - { "Z", 0, T_ST, NULL, NULL, NULL, NULL, "-wp0" }, - { "m", 0, T_V, NULL, NULL, NULL, NULL, "-wp" }, - { "feEgGaA", 0, T_D, NULL, NULL, NULL, T_LD, "-wp0 +#" }, - { "c", 0, T_I, NULL, T_W, NULL, NULL, "-w" }, - { "C", 0, T_W, NULL, NULL, NULL, NULL, "-w" }, - { "s", 1, T_C, NULL, T_W, NULL, NULL, "-wp" }, - { "S", 1, T_W, NULL, NULL, NULL, NULL, "-wp" }, - { "p", 1, T_V, NULL, NULL, NULL, NULL, "-w" }, - { "n", 1, T_I, T_S, T_L, T_LL, NULL, "" }, + { "di", 0, T_I, T_I, T_L, T_LL, T_LL, T_ST, "-wp0 +" }, + { "oxX", 0, T_UI, T_UI, T_UL, T_ULL, T_ULL, T_ST, "-wp0#" }, + { "u", 0, T_UI, T_UI, T_UL, T_ULL, T_ULL, T_ST, "-wp0" }, +/* A GNU extension. */ + { "m", 0, T_V, NULL, NULL, NULL, NULL, NULL, "-wp" }, + { "feEgGaA", 0, T_D, NULL, NULL, NULL, T_LD, NULL, "-wp0 +#" }, + { "c", 0, T_I, NULL, T_W, NULL, NULL, NULL, "-w" }, + { "C", 0, T_W, NULL, NULL, NULL, NULL, NULL, "-w" }, + { "s", 1, T_C, NULL, T_W, NULL, NULL, NULL, "-wp" }, + { "S", 1, T_W, NULL, NULL, NULL, NULL, NULL, "-wp" }, + { "p", 1, T_V, NULL, NULL, NULL, NULL, NULL, "-w" }, + { "n", 1, T_I, T_S, T_L, T_LL, NULL, NULL, "" }, { NULL } }; static format_char_info scan_char_table[] = { - { "di", 1, T_I, T_S, T_L, T_LL, T_LL, "*" }, - { "ouxX", 1, T_UI, T_US, T_UL, T_ULL, T_ULL, "*" }, - { "efgEGaA", 1, T_F, NULL, T_D, NULL, T_LD, "*" }, - { "sc", 1, T_C, NULL, T_W, NULL, NULL, "*a" }, - { "[", 1, T_C, NULL, NULL, NULL, NULL, "*a" }, - { "C", 1, T_W, NULL, NULL, NULL, NULL, "*" }, - { "S", 1, T_W, NULL, NULL, NULL, NULL, "*" }, - { "p", 2, T_V, NULL, NULL, NULL, NULL, "*" }, - { "n", 1, T_I, T_S, T_L, T_LL, NULL, "" }, + { "di", 1, T_I, T_S, T_L, T_LL, T_LL, NULL, "*" }, + { "ouxX", 1, T_UI, T_US, T_UL, T_ULL, T_ULL, NULL, "*" }, + { "efgEGaA", 1, T_F, NULL, T_D, NULL, T_LD, NULL, "*" }, + { "sc", 1, T_C, NULL, T_W, NULL, NULL, NULL, "*a" }, + { "[", 1, T_C, NULL, NULL, NULL, NULL, NULL, "*a" }, + { "C", 1, T_W, NULL, NULL, NULL, NULL, NULL, "*" }, + { "S", 1, T_W, NULL, NULL, NULL, NULL, NULL, "*" }, + { "p", 2, T_V, NULL, NULL, NULL, NULL, NULL, "*" }, + { "n", 1, T_I, T_S, T_L, T_LL, NULL, NULL, "" }, { NULL } }; @@ -1345,7 +1347,7 @@ check_format_info (info, params) if (index (flag_chars, *format_chars) != 0) { sprintf (message, "repeated `%c' flag in format", - *format_chars); + *format_chars++); warning (message); } else @@ -1453,6 +1455,12 @@ check_format_info (info, params) pedwarn ("ANSI C does not support the `%c' length modifier", length_char); } + else if (*format_chars == 'Z') + { + length_char = *format_chars++; + if (pedantic) + pedwarn ("ANSI C does not support the `Z' length modifier"); + } else length_char = 0; if (length_char == 'l' && *format_chars == 'l') @@ -1575,6 +1583,7 @@ check_format_info (info, params) case 'l': wanted_type = fci->llen ? *(fci->llen) : 0; break; case 'q': wanted_type = fci->qlen ? *(fci->qlen) : 0; break; case 'L': wanted_type = fci->bigllen ? *(fci->bigllen) : 0; break; + case 'Z': wanted_type = fci->zlen ? *fci->zlen : 0; break; } if (wanted_type == 0 || (pedantic && length_char == 'L' && integral_format)) |