- To: Simon Lange <s.lange@xxxxxxxxxx>
- Subject: Re: Predeclarations of classes
- From: Jonathan Wakely <jwakely.gcc@xxxxxxxxx>
- Date: Fri, 13 Apr 2012 16:45:53 +0100
- Cc: gcc-help@xxxxxxxxxxx
- Comment: DKIM? See http://www.dkim.org
- Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
- In-reply-to: <op.wcpgdoycq74zhu@web>
On 13 April 2012 14:14, 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"
>
>
> it's a simple predeclaration ? any idea ??
You must be using some other compiler, G++ doesn't issue any
diagnostic like that (and I've never heard the term predeclaration
before, it's usually called a forward declaration or more correctly
just declaration, as opposed to definition.)
[Linux C Programming]
[Linux Kernel]
[eCos]
[Fedora Development]
[Fedora Announce]
[Autoconf]
[The DWARVES Debugging Tools]
[Yosemite Campsites]
[Yosemite News]
[Linux GCC]