aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-decl.c
diff options
context:
space:
mode:
authorJoseph Myers <jsm28@cam.ac.uk>2000-08-04 17:10:14 +0100
committerJoseph Myers <jsm28@gcc.gnu.org>2000-08-04 17:10:14 +0100
commitb8458e3e8b0db246af9f1a7c3fe65d8cf88413b3 (patch)
tree4b719a27657bcbad494e3fbe0f70a91f8a9f0e2b /gcc/c-decl.c
parentc5ab7f91109e1569bb63c38e2e35e701e5af17ec (diff)
downloadgcc-b8458e3e8b0db246af9f1a7c3fe65d8cf88413b3.zip
gcc-b8458e3e8b0db246af9f1a7c3fe65d8cf88413b3.tar.gz
gcc-b8458e3e8b0db246af9f1a7c3fe65d8cf88413b3.tar.bz2
c-common.h (flag_isoc94): Declare.
* c-common.h (flag_isoc94): Declare. * c-decl.c (flag_isoc94): Define. (c_decode_option): Set flag_isoc94 as appropriate. * c-common.c (T_PD, T_IM, T_UIM): Define. (format_char_info): Add tlen and jlen. (print_char_table): Add entries for %t and %j. Allow %zn. Allow %F. Allow %lf. (scan_char_table): Add entries for %t and %j. Allow %F. Allow %l[. (time_char_table): Add NULL entries for %t and %j. (check_format_info): Allow for %t and %j. Warn for %F if pedantic and not C99. Warn for %lc, %ls and %l[ if pedantic and not C94. Warn for printf %lf if pedantic and not C99. Don't warn for empty precision. Allow precision argument to be unsigned int. If pedantic, warn for %p passed an argument not a pointer to possibly qualified void or a possibly qualified character type, and for pointer targets of the wrong sign, except for character pointers. cp: * decl.c (flag_isoc94): New variable. testsuite: * gcc.dg/c90-printf-1.c, gcc.dg/c94-printf-1.c: New tests. From-SVN: r35482
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r--gcc/c-decl.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index 886e374..6d08dfc 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -330,6 +330,10 @@ int flag_no_nonansi_builtin;
int flag_traditional;
+/* Nonzero means enable C89 Amendment 1 features, other than digraphs. */
+
+int flag_isoc94 = 0;
+
/* Nonzero means use the ISO C99 dialect of C. */
int flag_isoc99 = 0;
@@ -541,6 +545,7 @@ c_decode_option (argc, argv)
{
iso_1990:
flag_digraphs = 0;
+ flag_isoc94 = 0;
iso_1990_digraphs:
flag_traditional = 0;
flag_writable_strings = 0;
@@ -551,7 +556,7 @@ c_decode_option (argc, argv)
else if (!strcmp (argstart, "iso9899:199409"))
{
flag_digraphs = 1;
- /* ??? The other changes since ISO C 1990 are not supported. */
+ flag_isoc94 = 1;
goto iso_1990_digraphs;
}
else if (!strcmp (argstart, "iso9899:199x")
@@ -565,6 +570,7 @@ c_decode_option (argc, argv)
flag_no_nonansi_builtin = 1;
flag_isoc99 = 1;
flag_digraphs = 1;
+ flag_isoc94 = 1;
}
else if (!strcmp (argstart, "gnu89"))
{
@@ -574,6 +580,7 @@ c_decode_option (argc, argv)
flag_no_nonansi_builtin = 0;
flag_isoc99 = 0;
flag_digraphs = 1;
+ flag_isoc94 = 0;
}
else if (!strcmp (argstart, "gnu9x") || !strcmp (argstart, "gnu99"))
{
@@ -583,6 +590,7 @@ c_decode_option (argc, argv)
flag_no_nonansi_builtin = 0;
flag_isoc99 = 1;
flag_digraphs = 1;
+ flag_isoc94 = 1;
}
else
error ("unknown C standard `%s'", argstart);