ping for maintainer. Could this be considered for 4.8.3 please?
Thanks, Daniel. On Tue, Apr 1, 2014 at 2:46 PM, Daniel Gutson <daniel.gut...@tallertechnologies.com> wrote: > > I just realized I posted the patch in the wrong list. > > > ---------- Forwarded message ---------- > From: Daniel Gutson <daniel.gut...@tallertechnologies.com> > Date: Tue, Apr 1, 2014 at 10:43 AM > Subject: [PATCH] pedantic warning behavior when casting void* to > ptr-to-func, 4.8 and 4.9 > To: gcc Mailing List <g...@gcc.gnu.org> > > > Hi, > > I observed two different behaviors in gcc 4.8.2 and 4.9 regarding > the same issue, IMO both erroneous. > > Regarding 4.8.2, #pragma GCC diagnostic ignored "-pedantic" doesn't > work in cases such as: > void* p = 0; > #pragma GCC diagnostic ignored "-pedantic" > F* f2 = reinterpret_cast<F*>(p); > > (see testcase in the patch). > > The attached patch attempts to fix this issue. Since I no longer have > write access, please > apply this for me if correct (is the 4.8 branch still alive for adding > fixes?). > > Regarding 4.9, gcc fails to complain at all when -pedantic is passed, > even specifying -std=c++03. > Please let me know if this is truly a bug, in which case I could also > fix it for the latest version as well > (if so, please let me know if I should look into trunk or any other branch). > > Thanks, > > Daniel. > > 2014-03-31 Daniel Gutson <daniel.gut...@tallertechnologies.com> > > gcc/cp/ > * typeck.c (build_reinterpret_cast_1): Pass proper argument to > warn() in pedantic. > > gcc/testsuite/g++.dg/ > * diagnostic/pedantic.C: New test case.