This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
PR/7307 and pedantic confusion
- From: Gabriel Dos Reis <gdr at codesourcery dot com>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Jul 2002 03:52:45 +0200
- Subject: PR/7307 and pedantic confusion
- Organization: CodeSourcery, LLC
Hi,
While investigating PR/7307 (a regression), I came across the
following in cp/decl.c:cxx_init_decl_processing:6471:
/* Adjust various flags based on command-line settings. */
if (! flag_permissive && ! pedantic)
flag_pedantic_errors = 1;
which implies that if
1) the user does NOT specify -fpermissive nor -pedantic, then
he is automatically put in -pedantic-errors mode;
2) the user does specify -pedantic (not -pedantic-errors), then
he got warnings (based on what GCC thinks are "pedantic"
diagnostics) which means that diagnostics that were reported as
errors in case 1) are now reported as just warnings. Which is at
best confusing.
Why was that code written as is?
-- Gaby