parse error before `PARAMS' ? help please.

Rupert Wood me@rupey.net
Sun Sep 1 23:33:00 GMT 2002


Guy Montag wrote:

> I have been trying to figure out why when I include a
> GCC header that contains a prototype such as:
> 
> extern int toplev_main PARAMS ((int, char **));
:
> I am coming from a strong Java background and have
> been programming in C++ for a little while now. I
> think I remember this PARAMS keyword being mentioned
> in the C book (Kernighan-Ritchie). Is it an older C
> function style or is some kind of macro specific to
> GCC?

It's used to preprocess the source code in a compatible way for both
ANSI and K&R C compilers.

It's defined in include/ansidecl.h parallel to the gcc directory.
There's a large-ish comment about it there.

Rup.



More information about the Gcc-help mailing list