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]

[Bug c++/11332] New: [3.3?/3.4 regression] Spurious error with casts in ?: expression


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: [3.3?/3.4 regression] Spurious error with casts in ?:
                    expression
           Product: gcc
           Version: 3.3.1
            Status: UNCONFIRMED
          Severity: critical
          Priority: P1
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bangerth at dealii dot org
                CC: gcc-bugs at gcc dot gnu dot org,mark at codesourcery dot
                    com

Mark, I think this is due to your fixes for 10931/10990/... yesterday:
this doesn't compile any more though I think it should
---------------------------
struct B {};

int main () {
  B a;
  (i ? static_cast<B&>(a) :
       *static_cast<B*>(&a));
}
----------------------------

tmp/gg> ~/tmp/build-gcc/gcc-install/bin/c++ -c x.cc
x.cc: In function `int main()':
x.cc:5: error: `i' undeclared (first use this function)
x.cc:5: error: (Each undeclared identifier is reported only once for each
   function it appears in.)

I don't have a recent enough 3.3 branch, but if your patch went to
the branch as well, it should be investigated for 3.3.1 as well. The error
above is from mainline.

W.


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