This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Picking one solution to the "struct cpp_reader" protos.h problem
- From: Neil Booth <neil at daikokuya dot co dot uk>
- To: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Cc: gcc at gcc dot gnu dot org, zack at codesourcery dot com
- Date: Thu, 23 Jan 2003 06:39:23 +0000
- Subject: Re: Picking one solution to the "struct cpp_reader" protos.h problem
- References: <200301230249.VAA10183@caip.rutgers.edu>
Kaveh R. Ghazi wrote:-
> Some protos.h files have prototypes which take a "struct cpp_reader *"
> as a parameter. This yields the "`struct cpp_reader' declared inside
> parameter list" warning because cpp_reader isn't yet declared.
>
> We now have three competing proposals/implementations to fix it.
>
> 1. Declare "struct cpp_reader" inside the protos.h file (arm-protos.h)
>
> 2. Wrap the prototypes inside some macro defined in cpplib.h to
> ensure we already have the cpp_reader declaration. If this one,
> then which macro? See rs6000-protos.h which uses GCC_CPPLIB_H.
>
> 3. Put struct cpp_reader in coretypes.h. See:
> http://gcc.gnu.org/ml/gcc-patches/2003-01/msg01271.html
> (This hasn't been done yet.)
>
> I think we should be consistent. Which of these solutions should we
> use across the board? Opinions?
I'm happy with 1 or 3. 3 is probably best.
Neil.