This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
RE: parse error before `PARAMS' ? help please.
- From: "Rupert Wood" <me at rupey dot net>
- To: "'Guy Montag'" <theguymontag at yahoo dot com>
- Cc: <gcc-help at gcc dot gnu dot org>
- Date: Mon, 2 Sep 2002 07:33:18 +0100
- Subject: 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.