This is the mail archive of the gcc-help@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: parse error before `PARAMS' ? help please.


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.


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