[Bug c++/33494] New: [4.1/4.2/4.3 regression] Broken diagnostic: 'modop_expr' not supported by dump_expr

reichelt at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed Sep 19 06:49:00 GMT 2007


The C++ frontend generates a broken diagnostic for the following code
snippet since GCC 3.4.0:

==============================================
template<int> void foo(int(*f=0)());
==============================================

bug.cc:1: error: variable or field 'foo' declared void
bug.cc:1: error: 'f' was not declared in this scope
bug.cc:1: error: '(int)(#'modop_expr' not supported by dump_expr#<expression
error>)' cannot be used as a function

Another testcase for the unsupported 'modop_expr' is the following:

==============================================
template<int> struct A
{
  int i;
  typeof(A = A()) i;
};
==============================================

bug.cc:2: error: expected primary-expression before '=' token
bug.cc:2: error: declaration of '__typeof__ (#'modop_expr' not supported by
dump_expr#<expression error>) A<<anonymous> >::i'
bug.cc:1: error: conflicts with previous declaration 'int A<<anonymous> >::i'


-- 
           Summary: [4.1/4.2/4.3 regression] Broken diagnostic: 'modop_expr'
                    not supported by dump_expr
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: diagnostic, monitored
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org


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



More information about the Gcc-bugs mailing list