This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PR/7307 and pedantic confusion


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]