compiles under g++ but not gcc

sol sol@avalon.pascal-central.com
Fri Aug 27 09:18:00 GMT 2004


On Fri, 2004-08-27 at 01:18, Zack Weinberg wrote:

> This question is appropriate for gcc-help@gcc.gnu.org, or for a
> general learning-to-program group, but not for gcc@gcc.gnu.org.
> gcc@gcc.gnu.org is for discussion of development _of_, not _with_,
> gcc.
> 
> I will answer this question anyway, but please do not post further
> such questions.
> 
ok.

> Since you did not show us any code, I can only guess what your problem
> is.  You have probably run afoul of a well-known difference between C
> and C++.  In C++, if you write
> 
>     struct S { int whatever; };
> 
> you may then write 
> 
>     S variable;
> 
> In C by contrast you must write
> 
>     struct S variable;
> 
> unless you use a typedef to define 'S' as equivalent to 'struct S'.
> 
> zw

almost... close enough to point me in the right direction. it's fixed,
thanks! :)

-- 
solomon
sol@avalon.pascal-central.com



More information about the Gcc mailing list