This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Predeclarations of classes
- From: Andrew Haley <aph at redhat dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Fri, 13 Apr 2012 14:19:54 +0100
- Subject: Re: Predeclarations of classes
- References: <op.wcpgdoycq74zhu@web>
On 04/13/2012 02:14 PM, Simon Lange wrote:
> hallo list,
>
> converting a project from VisualC++ to GCC (4.6.1) the following problem
> occurs:
>
> class A; //*
>
> class B
> {
>
> public:
>
> A* a;
> };
>
>
> brings at line " //* " the error-message:
>
> "predeclaration of struct A"
Not for me.
happy:~ $ ~/gcc/gcc-4_6-branch/install/bin/g++ t.cc -c
happy:~ $
Andrew.