[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#168706: g++-3.0: Bad syntax error on nested classes' member functions.



Package: g++-3.0
Version: 1:3.0.4-7
Severity: normal

The source below makes G++-3.0 report a syntax error where none exists.

Basically it doesn't wait before giving up on the typename.

// Comment out to make it work.
#define BREAK

struct a {
  struct b {
    typedef unsigned int foo_t;
    foo_t frobnicate();
  };
};


#ifndef BREAK
a::b::foo_t a::b::frobnicate() {

}
#else
foo_t a::b::frobnicate() {
  return 0;
}
#endif


-- System Information
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux crafter 2.4.19 #1 Fri Sep 27 18:25:53 PDT 2002 i686
Locale: LANG=C, LC_CTYPE=C

Versions of packages g++-3.0 depends on:
ii  gcc-3.0                       1:3.0.4-7  The GNU C compiler.
ii  gcc-3.0-base                  1:3.0.4-7  The GNU Compiler Collection (base 
ii  libc6                         2.2.5-14.3 GNU C Library: Shared libraries an
ii  libstdc++3-dev                1:3.0.4-7  The GNU stdc++ library version 3 (




Reply to: