From 565083069d08d22e1c8882948fba1e90dcde1388 Mon Sep 17 00:00:00 2001 From: Gabriel Dos Reis Date: Sun, 21 Jul 2002 21:35:17 +0000 Subject: [PATCH] c-decl.c (build_array_declarator): Say 'ISO C90', not 'ISO C89'. 2002-07-21 Gabriel Dos Reis * c-decl.c (build_array_declarator): Say 'ISO C90', not 'ISO C89'. (grokdeclarator): Likewise. * c-format.c (C_STD_NAME): Likewise. * c-lex.c (interpret_integer): Likewise. * c-typeck.c (build_array_ref): Likewise. * cpplex.c (_cpp_lex_direct): Likewise. * toplev.c (documented_lang_options): Likewise. testsuite/ 2002-07-21 Gabriel Dos Reis * gcc.dg/c90-arraydecl-1.c: Change C89 too C90. From-SVN: r55629 --- gcc/ChangeLog | 10 ++++++++++ gcc/c-decl.c | 14 +++++++------- gcc/c-format.c | 2 +- gcc/c-lex.c | 4 ++-- gcc/c-typeck.c | 2 +- gcc/cpplex.c | 2 +- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gcc.dg/c90-arraydecl-1.c | 14 +++++++------- gcc/toplev.c | 2 +- 9 files changed, 34 insertions(+), 20 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5039aab45af..efb665865ff 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2002-07-21 Gabriel Dos Reis + + * c-decl.c (build_array_declarator): Say 'ISO C90', not 'ISO C89'. + (grokdeclarator): Likewise. + * c-format.c (C_STD_NAME): Likewise. + * c-lex.c (interpret_integer): Likewise. + * c-typeck.c (build_array_ref): Likewise. + * cpplex.c (_cpp_lex_direct): Likewise. + * toplev.c (documented_lang_options): Likewise. + 2002-07-21 Neil Booth * c-format.c (T99_I, T99_UI): Remove. diff --git a/gcc/c-decl.c b/gcc/c-decl.c index bce03a9b91a..c6e592ac5ff 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -3115,9 +3115,9 @@ build_array_declarator (expr, quals, static_p, vla_unspec_p) if (pedantic && !flag_isoc99) { if (static_p || quals != NULL_TREE) - pedwarn ("ISO C89 does not support `static' or type qualifiers in parameter array declarators"); + pedwarn ("ISO C90 does not support `static' or type qualifiers in parameter array declarators"); if (vla_unspec_p) - pedwarn ("ISO C89 does not support `[*]' array declarators"); + pedwarn ("ISO C90 does not support `[*]' array declarators"); } if (vla_unspec_p) warning ("GCC does not yet properly implement `[*]' array declarators"); @@ -3909,7 +3909,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized) { if (pedantic && !flag_isoc99 && ! in_system_header && warn_long_long) - pedwarn ("ISO C89 does not support `long long'"); + pedwarn ("ISO C90 does not support `long long'"); longlong = 1; } } @@ -4110,7 +4110,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized) if (specbits & 1 << (int) RID_COMPLEX) { if (pedantic && !flag_isoc99) - pedwarn ("ISO C89 does not support complex types"); + pedwarn ("ISO C90 does not support complex types"); /* If we just have "complex", it is equivalent to "complex double", but if any modifiers at all are specified it is the complex form of TYPE. E.g, "complex short" is @@ -4388,10 +4388,10 @@ grokdeclarator (declarator, declspecs, decl_context, initialized) if (!flag_isoc99 && pedantic) { if (TREE_CONSTANT (size)) - pedwarn ("ISO C89 forbids array `%s' whose size can't be evaluated", + pedwarn ("ISO C90 forbids array `%s' whose size can't be evaluated", name); else - pedwarn ("ISO C89 forbids variable-size array `%s'", + pedwarn ("ISO C90 forbids variable-size array `%s'", name); } } @@ -4434,7 +4434,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized) else if (decl_context == FIELD) { if (pedantic && !flag_isoc99 && !in_system_header) - pedwarn ("ISO C89 does not support flexible array members"); + pedwarn ("ISO C90 does not support flexible array members"); /* ISO C99 Flexible array members are effectively identical to GCC's zero-length array extension. */ diff --git a/gcc/c-format.c b/gcc/c-format.c index aa263aeb2d9..6423d904745 100644 --- a/gcc/c-format.c +++ b/gcc/c-format.c @@ -356,7 +356,7 @@ enum format_std_version ? "ISO C++" \ : ((FEATURE_VER) == STD_EXT \ ? "ISO C" \ - : "ISO C89")) + : "ISO C90")) /* Adjust a C standard version, which may be STD_C9L, to account for -Wno-long-long. Returns other standard versions unchanged. */ #define ADJ_STD(VER) ((int)((VER) == STD_C9L \ diff --git a/gcc/c-lex.c b/gcc/c-lex.c index 3d8ecff0885..4a7f05ae746 100644 --- a/gcc/c-lex.c +++ b/gcc/c-lex.c @@ -853,10 +853,10 @@ interpret_integer (token, flags) if (itk_u < itk_unsigned_long) itk_u = itk_unsigned_long; itk = itk_u; - warning ("this decimal constant is unsigned only in ISO C89"); + warning ("this decimal constant is unsigned only in ISO C90"); } else if (warn_traditional) - warning ("this decimal constant would be unsigned in ISO C89"); + warning ("this decimal constant would be unsigned in ISO C90"); } } } diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c index 089375e904d..48b421313d6 100644 --- a/gcc/c-typeck.c +++ b/gcc/c-typeck.c @@ -1362,7 +1362,7 @@ build_array_ref (array, index) if (TREE_CODE (foo) == VAR_DECL && DECL_REGISTER (foo)) pedwarn ("ISO C forbids subscripting `register' array"); else if (! flag_isoc99 && ! lvalue_p (foo)) - pedwarn ("ISO C89 forbids subscripting non-lvalue array"); + pedwarn ("ISO C90 forbids subscripting non-lvalue array"); } type = TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (array))); diff --git a/gcc/cpplex.c b/gcc/cpplex.c index 44fbe2c738e..7942c96ad30 100644 --- a/gcc/cpplex.c +++ b/gcc/cpplex.c @@ -1100,7 +1100,7 @@ _cpp_lex_direct (pfile) && ! buffer->warned_cplusplus_comments) { cpp_error (pfile, DL_PEDWARN, - "C++ style comments are not allowed in ISO C89"); + "C++ style comments are not allowed in ISO C90"); cpp_error (pfile, DL_PEDWARN, "(this will be reported only once per input file)"); buffer->warned_cplusplus_comments = 1; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5388182c101..bf8976fdaf9 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2002-07-21 Gabriel Dos Reis + + * gcc.dg/c90-arraydecl-1.c: Change C89 too C90. + 2002-07-20 Roger Sayle * gcc.c-torture/execute/20020720-1.c: New testcase. diff --git a/gcc/testsuite/gcc.dg/c90-arraydecl-1.c b/gcc/testsuite/gcc.dg/c90-arraydecl-1.c index b3e7035c059..47334b9123d 100644 --- a/gcc/testsuite/gcc.dg/c90-arraydecl-1.c +++ b/gcc/testsuite/gcc.dg/c90-arraydecl-1.c @@ -8,24 +8,24 @@ it correctly, so gives a warning about this. so we can't yet test here that we get just one error and no warnings. */ -void foo0 (int a, int b[*]); /* { dg-error "ISO C89" "\[*\] not in C89" } */ +void foo0 (int a, int b[*]); /* { dg-error "ISO C90" "\[*\] not in C90" } */ /* { dg-warning "implement" "\[*\] not implemented" { target *-*-* } 11 } */ -void foo1 (int, int [*]); /* { dg-error "ISO C89" "\[*\] not in C89" } */ +void foo1 (int, int [*]); /* { dg-error "ISO C90" "\[*\] not in C90" } */ /* { dg-warning "implement" "\[*\] not implemented" { target *-*-* } 13 } */ /* Use of static and type qualifiers (not allowed with abstract declarators) is a C99 feature. */ void bar0 (int a[const]); /* { dg-bogus "warning" "warning in place of error" } */ -/* { dg-error "ISO C89" "\[quals\] not in C89" { target *-*-* } 19 } */ +/* { dg-error "ISO C90" "\[quals\] not in C90" { target *-*-* } 19 } */ void bar1 (int a[const 2]); /* { dg-bogus "warning" "warning in place of error" } */ -/* { dg-error "ISO C89" "\[quals expr\] not in C89" { target *-*-* } 21 } */ +/* { dg-error "ISO C90" "\[quals expr\] not in C90" { target *-*-* } 21 } */ void bar2 (int a[static 2]); /* { dg-bogus "warning" "warning in place of error" } */ -/* { dg-error "ISO C89" "\[static expr\] not in C89" { target *-*-* } 23 } */ +/* { dg-error "ISO C90" "\[static expr\] not in C90" { target *-*-* } 23 } */ void bar3 (int a[static const 2]); /* { dg-bogus "warning" "warning in place of error" } */ -/* { dg-error "ISO C89" "\[static quals expr\] not in C89" { target *-*-* } 25 } */ +/* { dg-error "ISO C90" "\[static quals expr\] not in C90" { target *-*-* } 25 } */ void bar4 (int a[const static 2]); /* { dg-bogus "warning" "warning in place of error" } */ -/* { dg-error "ISO C89" "\[quals static expr\] not in C89" { target *-*-* } 27 } */ +/* { dg-error "ISO C90" "\[quals static expr\] not in C90" { target *-*-* } 27 } */ /* Because [*] isn't properly implemented and so warns, we don't test here for [const *] yet. */ diff --git a/gcc/toplev.c b/gcc/toplev.c index 60cb3beb2ad..f9ebc17aefc 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -1196,7 +1196,7 @@ documented_lang_options[] = enabled by default. */ { "-ansi", - N_("Compile just for ISO C89") }, + N_("Compile just for ISO C90") }, { "-std= ", N_("Determine language standard") }, -- 2.30.2