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++/11573] New: Forward class declaration is rejected in throw declaration


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

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

           Summary: Forward class declaration is rejected in throw
                    declaration
           Product: gcc
           Version: 3.2
            Status: UNCONFIRMED
          Severity: minor
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: klaus dot kretschel at dlr dot de
                CC: gcc-bugs at gcc dot gnu dot org

Input (forw.cc):
struct TimeRangeException;
struct DateTime
{
  void setDate(void) throw (TimeRangeException);
};

Call:
g++ -c forw.cc

Output:
forw.cc:4: invalid use of undefined type `struct TimeRangeException'
forw.cc:1: forward declaration of `struct TimeRangeException'

Expected:
No error message. Code compiles fine on other compilers, including g++ 2.95.3.

System: Linux

Details from g++ -v:
Reading specs from /usr/lib/gcc-lib/i486-suse-linux/3.2/specs
Configured with: ../configure --enable-threads=posix --prefix=/usr
--with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/share/man
--libdir=/usr/lib --enable-languages=c,c++,f77,objc,java,ada --enable-libgcj
--with-gxx-include-dir=/usr/include/g++ --with-slibdir=/lib --with-system-zlib
--enable-shared --enable-__cxa_atexit i486-suse-linux
Thread model: posix
gcc version 3.2
 /usr/lib/gcc-lib/i486-suse-linux/3.2/cc1plus -v -D__GNUC__=3 -D__GNUC_MINOR__=2
-D__GNUC_PATCHLEVEL__=0 -D__GXX_ABI_VERSION=102 -D__ELF__ -Dunix -D__gnu_linux__
-Dlinux -D__ELF__ -D__unix__ -D__gnu_linux__ -D__linux__ -D__unix -D__linux
-Asystem=posix -D__NO_INLINE__ -D__STDC_HOSTED__=1 -D_GNU_SOURCE -Acpu=i386
-Amachine=i386 -Di386 -D__i386 -D__i386__ -D__tune_i486__ forw.cc -D__GNUG__=3
-D__DEPRECATED -D__EXCEPTIONS -quiet -dumpbase forw.cc -version -o
/tmp/ccYHlloE.s
GNU CPP version 3.2 (cpplib) (i386 Linux/ELF)
GNU C++ version 3.2 (i486-suse-linux)
        compiled by GNU C version 3.2.


PS: Unfortunately your guidelines do not match the form. Don't know what these
triplets mean. Also there is no "keywords" section.


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