UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor chales
Visitor
22,720 Views
Registered: ‎09-15-2011

"error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token" compiler error

Hi,

another newby trip-up I expect....

 

When I build the project (yes I have done 'build all')

 

../src/ivk_scaler.c:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token

../src/ivk_scaler.c:172: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token

../src/ivk_scaler.c:223: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token

../src/ivk_scaler.c:269: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token

../src/ivk_scaler.c:402: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token

../src/ivk_scaler.c:433: error: old-style parameter declarations in prototyped function definition

../src/ivk_scaler.c:433: error: expected '{' at end of input

make: *** [src/ivk_scaler.o] Error 1

 

inside the .c file the function syntx looks fine.

paths look OK.

This is the only error. It looks like a missing brace, but I can't see it.

No joy from other posts on this issue.

Do I have a switch wrong in a .h someplace? Any clues?

 

A bit lost.

 

cheers

colin

 

Tags (1)
0 Kudos
3 Replies
Professor
Professor
22,703 Views
Registered: ‎08-14-2007

Re: "error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token" compiler error

This would be pretty hard to debug without looking at the source code.  One thing

that can cause problems like this is an errant macro definition.  For example having

an unintended semicolon at the end of a definition like:

 

#define FOO  5 ;

 

Since the macro pre-processor will insert the semicolon as well as the 5 when the

macro is used, you can have any number of syntax errors.  Is there something common

to all of the lines where you get the error?

 

-- Gabor

-- Gabor
0 Kudos
Professor
Professor
22,702 Views
Registered: ‎08-14-2007

Re: "error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token" compiler error

One more thing, if you have any #include files in the offending source, the extra or

mising brace could be in the include file rather than the source where the errors occur...

-- Gabor
0 Kudos
Visitor chales
Visitor
22,696 Views
Registered: ‎09-15-2011

Re: "error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token" compiler error

Problem solved... there was some kind of invisible corruption in the .c

 

Igot another copy (looked the same) from a colleague's machine ... worked fine.

 

Hate it when that happens.

 

Thanks

 

Colin

 

0 Kudos