diff options
Diffstat (limited to 'gcc/c-errors.c')
-rw-r--r-- | gcc/c-errors.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/c-errors.c b/gcc/c-errors.c index 2a2fdc0c440..fa71b8cfa97 100644 --- a/gcc/c-errors.c +++ b/gcc/c-errors.c @@ -43,3 +43,21 @@ pedwarn_c99 (const char *msgid, ...) report_diagnostic (&diagnostic); va_end (ap); } + +/* Issue an ISO C90 pedantic warning MSGID. This function is supposed to + be used for matters that are allowed in ISO C99 but not supported in + ISO C90, thus we explicitly don't pedwarn when C99 is specified. + (There is no flag_c90.) */ + +void +pedwarn_c90 (const char *msgid, ...) +{ + diagnostic_info diagnostic; + va_list ap; + + va_start (ap, msgid); + diagnostic_set_info (&diagnostic, msgid, &ap, input_location, + flag_isoc99 ? DK_WARNING : pedantic_error_kind ()); + report_diagnostic (&diagnostic); + va_end (ap); +} |