This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: ANSIfy cp/parser.c
> > It depends on what you call "core compiler". For example, it is safe
> > if prototypes are seen before actual use -- which is the case in the
> > other front-ends.
>
> Yes, "safe" if the compiler allows it, ISO C does not.
Sorry I goofed, let me clarify.
This is allowed in ISO C (assuming bool is char if necessary.)
> extern void foo (bool);
> void foo (bool a)
> {
> }
This is not:
> extern void bar (bool);
> void bar (a)
> bool a;
> {
> }
GCC accepts the latter as an extension.
When we finally convert the "core compiler" function definitions to
ISO style, as in the first example, then "bool" should work as
parameters there too.
--Kaveh
--
Kaveh R. Ghazi ghazi@caip.rutgers.edu