cpperror.c: Merge handlers of PEDWARN and WARNING.
* cpperror.c: Merge handlers of PEDWARN and WARNING. Have -Werror make pedantic warnings errors, like the rest of GCC. Co-Authored-By: Neil Booth <neil@daikokuya.demon.co.uk> From-SVN: r39206
This commit is contained in:
parent
c8f33f223b
commit
c933c209dd
@ -1,3 +1,10 @@
|
|||||||
|
2001-01-23 Chris Demetriou <cgd@sibyte.com>
|
||||||
|
Neil Booth <neil@daikokuya.demon.co.uk>
|
||||||
|
|
||||||
|
* cpperror.c: Merge handlers of PEDWARN and WARNING.
|
||||||
|
Have -Werror make pedantic warnings errors, like the
|
||||||
|
rest of GCC.
|
||||||
|
|
||||||
2001-01-23 Phil Edwards <pme@sources.redhat.com>
|
2001-01-23 Phil Edwards <pme@sources.redhat.com>
|
||||||
|
|
||||||
* c-tree.texi (IDENTIFIER_LENGTH): Fix typo.
|
* c-tree.texi (IDENTIFIER_LENGTH): Fix typo.
|
||||||
|
@ -154,42 +154,25 @@ _cpp_begin_message (pfile, code, file, pos)
|
|||||||
|
|
||||||
switch (code)
|
switch (code)
|
||||||
{
|
{
|
||||||
|
case PEDWARN:
|
||||||
case WARNING:
|
case WARNING:
|
||||||
if (CPP_IN_SYSTEM_HEADER (pfile)
|
if (CPP_IN_SYSTEM_HEADER (pfile)
|
||||||
&& ! CPP_OPTION (pfile, warn_system_headers))
|
&& ! CPP_OPTION (pfile, warn_system_headers))
|
||||||
return 0;
|
return 0;
|
||||||
if (! CPP_OPTION (pfile, warnings_are_errors))
|
if (CPP_OPTION (pfile, warnings_are_errors)
|
||||||
{
|
|| (code == PEDWARN && CPP_OPTION (pfile, pedantic_errors)))
|
||||||
if (CPP_OPTION (pfile, inhibit_warnings))
|
|
||||||
return 0;
|
|
||||||
is_warning = 1;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
if (CPP_OPTION (pfile, inhibit_errors))
|
if (CPP_OPTION (pfile, inhibit_errors))
|
||||||
return 0;
|
return 0;
|
||||||
if (pfile->errors < CPP_FATAL_LIMIT)
|
if (pfile->errors < CPP_FATAL_LIMIT)
|
||||||
pfile->errors++;
|
pfile->errors++;
|
||||||
}
|
}
|
||||||
break;
|
else
|
||||||
|
|
||||||
case PEDWARN:
|
|
||||||
if (CPP_IN_SYSTEM_HEADER (pfile)
|
|
||||||
&& ! CPP_OPTION (pfile, warn_system_headers))
|
|
||||||
return 0;
|
|
||||||
if (! CPP_OPTION (pfile, pedantic_errors))
|
|
||||||
{
|
{
|
||||||
if (CPP_OPTION (pfile, inhibit_warnings))
|
if (CPP_OPTION (pfile, inhibit_warnings))
|
||||||
return 0;
|
return 0;
|
||||||
is_warning = 1;
|
is_warning = 1;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
if (CPP_OPTION (pfile, inhibit_errors))
|
|
||||||
return 0;
|
|
||||||
if (pfile->errors < CPP_FATAL_LIMIT)
|
|
||||||
pfile->errors++;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ERROR:
|
case ERROR:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user