This is the mail archive of the gcc@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]

Re: compiles under g++ but not gcc


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


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