[Bug libstdc++/35637] [4.3 Regression] tr1::function fails with const member function pointer
--- Comment #13 from mmitchel at gcc dot gnu dot org 2008-06-13 21:59 --- I've reclosed this bug. Manuel, if you'd like to open another issue for Comment #9, please go ahead. Thanks, -- Mark -- mmitchel at gcc dot gnu dot org changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35637
[Bug libstdc++/35637] [4.3 Regression] tr1::function fails with const member function pointer
--- Comment #11 from mmitchel at gcc dot gnu dot org 2008-04-28 04:40 --- Manuel -- Would you please open a new bug for the diagnostic.c issue and close this one now that the library problem has been resolved? Thanks, -- Mark -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35637
[Bug libstdc++/35637] [4.3 Regression] tr1::function fails with const member function pointer
--- Comment #10 from pcarlini at suse dot de 2008-03-21 00:01 --- Thanks. Note, I cannot really use -Wsystem-headers in library testcases, because in that way other, completely, unrelated warnings are always triggered. I think we should not do much more at this stage for 4_3-branch (in particular in the library side), for 4_4 certainly there are many options. If the present issue gets fixed we can for instance revert completely the library change, testcase included. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35637
[Bug libstdc++/35637] [4.3 Regression] tr1::function fails with const member function pointer
--- Comment #9 from manu at gcc dot gnu dot org 2008-03-20 23:56 --- Reopened. There is a bug here. The only difference between -pedantic and -pedantic-errors should be the type of diagnostic, not the amount. This bug was latent in diagnostics.c. Probably not a regression. -- manu at gcc dot gnu dot org changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|FIXED | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35637
[Bug libstdc++/35637] [4.3 Regression] tr1::function fails with const member function pointer
--- Comment #8 from manu at gcc dot gnu dot org 2008-03-20 23:54 --- OK. I see now what the problem is: -pedantic nothing, -pedantic-errors gives an error. The pedantic warning is in a system header, so it doesn't get emitted. When using -pedantic-errors, it is an error, so it gets through. This is an issue also for the C front-end that nobody noticed until now. The problem is in diagnostics.c (diagnostic_report_diagnostic) which tests for DK_WARNING whether they are inhibited by -w or within system headers, while pedwarn() is passing a DK_ERROR when -pedantic-errors is enabled. In my opinion, neither should give diagnostics for system headers unless requested (so I would add -Wsystem-headers to your testcases). The fix is that pedwarn() always passes a DK_WARNING type, while -pedantic-errors reclassifies -pedantic warnings to emit errors. In other words, -pedantic-errors would behave internally like -Werror=pedantic. I don't have time to work on this (or anything else in GCC) at the moment but I will keep it in my TODO list. Again, I would recommend adding -Wsystem-headers to your testcases to get diagnostics about system headers. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35637
[Bug libstdc++/35637] [4.3 Regression] tr1::function fails with const member function pointer
--- Comment #7 from pcarlini at suse dot de 2008-03-20 23:49 --- (In reply to comment #6) > Again, from GCC 4.4 on, -pedantic/-pedantic-errors should work the same as for > the C front-end, that is, -pedantic enables warnings, -pedantic-errors > converts > those warnings into errors. What is the problem then? The "problem" I was noticing was simply that the behavior of 4_3 was not the same as the behavior of 4_4: the former, as noticed by submitter, errors with -pedantic, the latter errors with -pedantic-errors. You are explaining that this is really the behavior we want, Ok with me! -- pcarlini at suse dot de changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35637
[Bug libstdc++/35637] [4.3 Regression] tr1::function fails with const member function pointer
--- Comment #6 from manu at gcc dot gnu dot org 2008-03-20 23:26 --- (In reply to comment #2) > In mainline, -pedantic-errors is needed. That seems weird to me, maybe Maunel > can help here. On the other hand, a problem with library code seems also > likely. > Why is it weird to need pedantic-errors to get an error for a pedantic warning? According to the comments in the code this is well-formed although it still requires a diagnostic. /* This was an error in C++98 (cv-qualifiers cannot be added to a function type), but DR 295 makes the code well-formed by dropping the extra qualifiers. */ Again, from GCC 4.4 on, -pedantic/-pedantic-errors should work the same as for the C front-end, that is, -pedantic enables warnings, -pedantic-errors converts those warnings into errors. What is the problem then? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35637
[Bug libstdc++/35637] [4.3 Regression] tr1::function fails with const member function pointer
-- pcarlini at suse dot de changed: What|Removed |Added Target Milestone|--- |4.3.1 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35637