[Bug c++/57068] New: gcc prints warning "ref-qualifiers only available with -std=c++0x or -std=gnu++0x" for operator&

kai.koehne at digia dot com gcc-bugzilla@gcc.gnu.org
Thu Apr 25 08:34:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57068

             Bug #: 57068
           Summary: gcc prints warning "ref-qualifiers only available with
                    -std=c++0x or -std=gnu++0x" for operator&
    Classification: Unclassified
           Product: gcc
           Version: 4.8.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: kai.koehne@digia.com


Created attachment 29934
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29934
minimal test file demonstrating the problem

gcc from 4.8 svn branch prints an incorrect warning about "ref-qualifiers only
available with -std=c++0x or -std=gnu++0x" for a line like

if (bool(windowState() & Enum1) == true)

where the & is actually an operator& for the class returned by windowState().
Attached code demonstrates the problem.

I didn't have this problem with gcc 4.8.0.



More information about the Gcc-bugs mailing list