This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Help Please -> with forward declarations...
- From: "Thomas J Amato" <Thomas_J_Amato at raytheon dot com>
- To: gcc at gcc dot gnu dot org, gcc-help at gcc dot gnu dot org
- Date: Wed, 15 May 2002 11:08:34 -0400
- Subject: Help Please -> with forward declarations...
Hi,
Can someone tell me if it is legal to forward declare an enumeration. I
created a small test case which gets the following error (using 3.0.3 on
Solaris 2.7):
gcc -x c++ -c enum_test.h
enum_test.h:2: use of enum `nBaseDims' without previous declaration
<<snip enum_test.h>>
enum colors;
void func1(colors var1);
Is this a bug in gcc? I can forward declare a class, struct, or union but
not an enum. Any help would be great.
Thanks,
Tom