diff options
author | Ulrich Drepper <drepper@gcc.gnu.org> | 2000-01-29 18:59:40 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@gcc.gnu.org> | 2000-01-29 18:59:40 +0000 |
commit | 3194854770602ec204dbfb8b3d469b56d5ef4d9c (patch) | |
tree | e93db4a12bbae12f8654d3ebe3b73a3c32c6088a /gcc | |
parent | 10b52f46188f1e93b43a435c6d2f589a974555fe (diff) | |
download | gcc-3194854770602ec204dbfb8b3d469b56d5ef4d9c.zip gcc-3194854770602ec204dbfb8b3d469b56d5ef4d9c.tar.gz gcc-3194854770602ec204dbfb8b3d469b56d5ef4d9c.tar.bz2 |
Adjust variable names, comments, help strings to c99.
From-SVN: r31689
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/c-common.c | 10 | ||||
-rw-r--r-- | gcc/c-lex.c | 2 | ||||
-rw-r--r-- | gcc/c-parse.y | 12 | ||||
-rw-r--r-- | gcc/c-tree.h | 4 | ||||
-rw-r--r-- | gcc/cccp.c | 38 | ||||
-rw-r--r-- | gcc/cpplib.h | 13 |
6 files changed, 39 insertions, 40 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c index 3d08120..1cfb765 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -271,7 +271,7 @@ declare_function_name () declare_hidden_char_array ("__FUNCTION__", name); declare_hidden_char_array ("__PRETTY_FUNCTION__", printable_name); /* The ISO C people "of course" couldn't use __FUNCTION__ in the - ISO C 9x standard; instead a new variable is invented. */ + ISO C 99 standard; instead a new variable is invented. */ declare_hidden_char_array ("__func__", name); } @@ -1775,7 +1775,7 @@ check_format_info (info, params) else if (*format_chars == 'Z' || *format_chars == 'z') { length_char = *format_chars++; - if (pedantic && (length_char == 'Z' || !flag_isoc9x)) + if (pedantic && (length_char == 'Z' || !flag_isoc99)) warning ("ANSI C does not support the `%c' length modifier", length_char); } @@ -1784,13 +1784,13 @@ check_format_info (info, params) if (length_char == 'l' && *format_chars == 'l') { length_char = 'q', format_chars++; - if (pedantic && !flag_isoc9x) + if (pedantic && !flag_isoc99) warning ("ANSI C does not support the `ll' length modifier"); } else if (length_char == 'h' && *format_chars == 'h') { length_char = 'H', format_chars++; - if (pedantic && !flag_isoc9x) + if (pedantic && !flag_isoc99) warning ("ANSI C does not support the `hh' length modifier"); } if (*format_chars == 'a' && info->format_type == scanf_format_type) @@ -1820,7 +1820,7 @@ check_format_info (info, params) /* The a and A formats are C99 extensions. */ if (pedantic && info->format_type != strftime_format_type && (format_char == 'a' || format_char == 'A') - && !flag_isoc9x) + && !flag_isoc99) warning ("ANSI C does not support the `%c' format", format_char); format_chars++; switch (info->format_type) diff --git a/gcc/c-lex.c b/gcc/c-lex.c index a69aa07..1d271b0 100644 --- a/gcc/c-lex.c +++ b/gcc/c-lex.c @@ -340,7 +340,7 @@ init_lex () UNSET_RESERVED_WORD ("iterator"); UNSET_RESERVED_WORD ("complex"); } - else if (!flag_isoc9x) + else if (!flag_isoc99) UNSET_RESERVED_WORD ("restrict"); if (flag_no_asm) diff --git a/gcc/c-parse.y b/gcc/c-parse.y index 11a8751..33dd371 100644 --- a/gcc/c-parse.y +++ b/gcc/c-parse.y @@ -474,7 +474,7 @@ cast_expr: tree type = $2; finish_init (); - if (pedantic && ! flag_isoc9x) + if (pedantic && ! flag_isoc99) pedwarn ("ANSI C forbids constructor expressions"); if (TYPE_NAME (type) != 0) { @@ -1229,8 +1229,8 @@ parm_declarator: poplevel (0, 0, 0); } */ | parm_declarator '[' '*' ']' %prec '.' { $$ = build_nt (ARRAY_REF, $1, NULL_TREE); - if (! flag_isoc9x) - error ("`[*]' in parameter declaration only allowed in ISO C 9x"); + if (! flag_isoc99) + error ("`[*]' in parameter declaration only allowed in ISO C 99"); } | parm_declarator '[' expr ']' %prec '.' { $$ = build_nt (ARRAY_REF, $1, $3); } @@ -1263,8 +1263,8 @@ notype_declarator: { $$ = make_pointer_declarator ($2, $3); } | notype_declarator '[' '*' ']' %prec '.' { $$ = build_nt (ARRAY_REF, $1, NULL_TREE); - if (! flag_isoc9x) - error ("`[*]' in parameter declaration only allowed in ISO C 9x"); + if (! flag_isoc99) + error ("`[*]' in parameter declaration only allowed in ISO C 99"); } | notype_declarator '[' expr ']' %prec '.' { $$ = build_nt (ARRAY_REF, $1, $3); } @@ -1346,7 +1346,7 @@ maybecomma: maybecomma_warn: /* empty */ | ',' - { if (pedantic && ! flag_isoc9x) + { if (pedantic && ! flag_isoc99) pedwarn ("comma at end of enumerator list"); } ; diff --git a/gcc/c-tree.h b/gcc/c-tree.h index 5744760..67013e3 100644 --- a/gcc/c-tree.h +++ b/gcc/c-tree.h @@ -403,9 +403,9 @@ extern int warn_main; extern int flag_traditional; -/* Nonzero means use the ISO C9x dialect of C. */ +/* Nonzero means use the ISO C99 dialect of C. */ -extern int flag_isoc9x; +extern int flag_isoc99; /* Nonzero means to allow single precision math even if we're generally being traditional. */ @@ -256,9 +256,9 @@ int traditional; int c89; -/* Nonzero for the 199x C Standard. */ +/* Nonzero for the 1999 C Standard. */ -int c9x; +int c99; /* Nonzero causes output not to be done, but directives such as #define that have side effects @@ -581,7 +581,7 @@ static char rest_extension[] = "..."; #define REST_EXTENSION_LENGTH (sizeof (rest_extension) - 1) /* This is the implicit parameter name when using variable number of - parameters for macros using the ISO C 9x extension. */ + parameters for macros using the ISO C 99 extension. */ static char va_args_name[] = "__VA_ARGS__"; #define VA_ARGS_NAME_LENGTH (sizeof (va_args_name) - 1) @@ -1128,8 +1128,8 @@ print_help () printf (" -lang-fortran Assume that the input sources are in Fortran\n"); printf (" -lang-chill Assume that the input sources are in Chill\n"); printf (" -std=<std name> Specify the conformance standard; one of:\n"); - printf (" gnu89, gnu9x, c89, c9x, iso9899:1990,\n"); - printf (" iso9899:199409, iso9899:199x\n"); + printf (" gnu89, gnu99, c89, c99, iso9899:1990,\n"); + printf (" iso9899:199409, iso9899:1999\n"); printf (" -+ Allow parsing of C++ style features\n"); printf (" -w Inhibit warning messages\n"); printf (" -Wtrigraphs Warn if trigraphs are encountered\n"); @@ -1445,19 +1445,19 @@ main (argc, argv) case 'l': if (! strcmp (argv[i], "-lang-c")) - cplusplus = 0, cplusplus_comments = 1, c89 = 0, c9x = 1, objc = 0; + cplusplus = 0, cplusplus_comments = 1, c89 = 0, c99 = 1, objc = 0; else if (! strcmp (argv[i], "-lang-c89")) { - cplusplus = 0, cplusplus_comments = 0, c89 = 1, c9x = 0, objc = 0; + cplusplus = 0, cplusplus_comments = 0, c89 = 1, c99 = 0, objc = 0; no_trigraphs = 0; pend_defs[2*i] = "__STRICT_ANSI__"; } else if (! strcmp (argv[i], "-lang-c++")) - cplusplus = 1, cplusplus_comments = 1, c89 = 0, c9x = 0, objc = 0; + cplusplus = 1, cplusplus_comments = 1, c89 = 0, c99 = 0, objc = 0; else if (! strcmp (argv[i], "-lang-objc")) - cplusplus = 0, cplusplus_comments = 1, c89 = 0, c9x = 0, objc = 1; + cplusplus = 0, cplusplus_comments = 1, c89 = 0, c99 = 0, objc = 1; else if (! strcmp (argv[i], "-lang-objc++")) - cplusplus = 1, cplusplus_comments = 1, c89 = 0, c9x = 0, objc = 1; + cplusplus = 1, cplusplus_comments = 1, c89 = 0, c99 = 0, objc = 1; else if (! strcmp (argv[i], "-lang-asm")) lang_asm = 1; else if (! strcmp (argv[i], "-lang-fortran")) @@ -1473,24 +1473,24 @@ main (argc, argv) case 's': if (!strcmp (argv[i], "-std=gnu89")) { - cplusplus = 0, cplusplus_comments = 0, c89 = 1, c9x = 0, objc = 0; + cplusplus = 0, cplusplus_comments = 0, c89 = 1, c99 = 0, objc = 0; } else if (!strcmp (argv[i], "-std=gnu9x") || !strcmp (argv[i], "-std=gnu99")) { - cplusplus = 0, cplusplus_comments = 1, c89 = 0, c9x = 1, objc = 0; + cplusplus = 0, cplusplus_comments = 1, c89 = 0, c99 = 1, objc = 0; pend_defs[2*i+1] = "__STDC_VERSION__=199901L"; } else if (!strcmp (argv[i], "-std=iso9899:1990") || !strcmp (argv[i], "-std=c89")) { - cplusplus = 0, cplusplus_comments = 0, c89 = 1, c9x = 0, objc = 0; + cplusplus = 0, cplusplus_comments = 0, c89 = 1, c99 = 0, objc = 0; no_trigraphs = 0; pend_defs[2*i] = "__STRICT_ANSI__"; } else if (!strcmp (argv[i], "-std=iso9899:199409")) { - cplusplus = 0, cplusplus_comments = 0, c89 = 1, c9x = 0, objc = 0; + cplusplus = 0, cplusplus_comments = 0, c89 = 1, c99 = 0, objc = 0; no_trigraphs = 0; pend_defs[2*i] = "__STRICT_ANSI__"; pend_defs[2*i+1] = "__STDC_VERSION__=199409L"; @@ -1500,7 +1500,7 @@ main (argc, argv) || !strcmp (argv[i], "-std=c9x") || !strcmp (argv[i], "-std=c99")) { - cplusplus = 0, cplusplus_comments = 1, c89 = 0, c9x = 1, objc = 0; + cplusplus = 0, cplusplus_comments = 1, c89 = 0, c99 = 1, objc = 0; no_trigraphs = 0; pend_defs[2*i] = "__STRICT_ANSI__"; pend_defs[2*i+1] = "__STDC_VERSION__=199901L"; @@ -5845,10 +5845,10 @@ create_definition (buf, limit, op) if (!is_idstart[*bp]) { - if (c9x && limit - bp > (long) REST_EXTENSION_LENGTH + if (c99 && limit - bp > (long) REST_EXTENSION_LENGTH && bcmp (rest_extension, bp, REST_EXTENSION_LENGTH) == 0) { - /* This is the ISO C 9x way to write macros with variable + /* This is the ISO C 99 way to write macros with variable number of arguments. */ rest_args = 1; temp->rest_args = 1; @@ -5872,7 +5872,7 @@ create_definition (buf, limit, op) } if (bp == temp->name && rest_args == 1) { - /* This is the ISO C 9x style. */ + /* This is the ISO C 99 style. */ temp->name = (U_CHAR *) va_args_name; temp->length = VA_ARGS_NAME_LENGTH; } @@ -5891,7 +5891,7 @@ create_definition (buf, limit, op) SKIP_WHITE_SPACE (bp); /* A comma at this point can only be followed by an identifier. */ if (!is_idstart[*bp] - && !(c9x && limit - bp > (long) REST_EXTENSION_LENGTH + && !(c99 && limit - bp > (long) REST_EXTENSION_LENGTH && bcmp (rest_extension, bp, REST_EXTENSION_LENGTH) == 0)) { error ("badly punctuated parameter list in `#define'"); goto nope; diff --git a/gcc/cpplib.h b/gcc/cpplib.h index 29514a1..882f462 100644 --- a/gcc/cpplib.h +++ b/gcc/cpplib.h @@ -114,7 +114,7 @@ struct cpp_buffer parse_underflow_t underflow; parse_cleanup_t cleanup; void *data; - + /* Value of if_stack at start of this file. Used to prohibit unmatched #endif (etc) in an include file. */ struct if_stack *if_stack; @@ -185,7 +185,7 @@ struct cpp_reader /* Hash table of macros and assertions. See cpphash.c */ #define HASHSIZE 1403 struct hashnode **hashtab; - + /* Hash table of other included files. See cppfiles.c */ #define ALL_INCLUDE_HASHSIZE 71 struct include_hash *all_include_files[ALL_INCLUDE_HASHSIZE]; @@ -465,9 +465,9 @@ struct cpp_options { /* Nonzero for the 1989 C Standard, including corrigenda and amendments. */ char c89; - /* Nonzero for the 199x C Standard, including corrigenda and amendments. */ - char c9x; - + /* Nonzero for the 1999 C Standard, including corrigenda and amendments. */ + char c99; + /* Nonzero means give all the error messages the ANSI standard requires. */ char pedantic; @@ -801,9 +801,8 @@ extern struct include_hash *include_hash PARAMS ((cpp_reader *, const char *, in #define INCLUDE_LEN_FUDGE 0 #endif - + #ifdef __cplusplus } #endif #endif /* __GCC_CPPLIB__ */ - |