diff options
| author | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-11-13 13:31:16 +0000 |
|---|---|---|
| committer | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-11-13 13:31:16 +0000 |
| commit | 31bd149b296eeb1cc7ba1c5c1984dcc31f5ced30 (patch) | |
| tree | 7f9d7597fc09c082ffe833c9bc59a6994331b0a1 /gcc/c-typeck.c | |
| parent | 967ccfb6ec2956b1132240b2e84da6fd3dbb9787 (diff) | |
| download | ppe42-gcc-31bd149b296eeb1cc7ba1c5c1984dcc31f5ced30.tar.gz ppe42-gcc-31bd149b296eeb1cc7ba1c5c1984dcc31f5ced30.zip | |
* c-parse.in (initelt): Give appropriate pedantic warnings,
depending on flag_isoc99, for non-ISO syntax and for C99 syntax
outside C99 mode.
(designator): If pedantic, pedwarn for a designator specifying a
range of elements.
* c-typeck.c (set_init_index, set_init_label): Don't pedwarn for
these cases.
* extend.texi: Document the C99 syntax as the preferred syntax,
and the pre-2.5 syntax as obsolete. Mention use of designator
lists for nested subobjects.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37421 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-typeck.c')
| -rw-r--r-- | gcc/c-typeck.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c index 16dbc34363b..08523b5abf2 100644 --- a/gcc/c-typeck.c +++ b/gcc/c-typeck.c @@ -5438,12 +5438,7 @@ set_init_index (first, last) if (last != 0 && tree_int_cst_lt (last, first)) error_init ("empty index range in initializer"); else - { - if (pedantic) - pedwarn ("ISO C89 forbids specifying element to initialize"); - - constructor_range_end = last ? convert (bitsizetype, last) : 0; - } + constructor_range_end = last ? convert (bitsizetype, last) : 0; } } @@ -5477,11 +5472,7 @@ set_init_label (fieldname) error ("field `%s' already initialized", IDENTIFIER_POINTER (fieldname)); else - { - constructor_fields = tail; - if (pedantic) - pedwarn ("ISO C89 forbids specifying structure member to initialize"); - } + constructor_fields = tail; } /* Add a new initializer to the tree of pending initializers. PURPOSE |

