Posts: 411
Joined: Sat Nov 30, 2013 5:27 pm

why this compilation error

Thu Feb 11, 2016 11:00 pm

Code: Select all error: duplicate ‘extern’
 //extern YYSTYPE yylval;
make[1]: *** [pat_decl_y.lo] Error 1
make[1]: Leaving directory `/home/lilzz/alliance-5.0/ppt/src'
make: *** [all-recursive] Error 1
[email protected]:~/alliance-5.0/ppt$ 

//extern YYSTYPE yylval I already have that // which is a comment.
why still throwing me an error

User avatar
Posts: 2331
Joined: Sat Jan 21, 2012 8:13 am
Location: Melbourne, Australia
Contact: Website

Re: why this compilation error

Fri Feb 12, 2016 7:13 am

It is only a comment in C99 and beyond. Possibly the compiler flags are setting it to C89.

I used to love YACC. I haven't used YACC in a long time ...

How do I enable C++ styled comments in gcc while leaving ANSI enabled?

User avatar
Posts: 3085
Joined: Tue Oct 11, 2011 8:38 pm

Re: why this compilation error

Fri Feb 12, 2016 11:58 am

As always, we need a lot more context about what you have done.

For a start, what is wrong with yum or apt-get install alliance ?

Return to “C/C++”