This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Picking one solution to the "struct cpp_reader" protos.h problem
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- To: gcc at gcc dot gnu dot org
- Cc: neil at daikokuya dot co dot uk, zack at codesourcery dot com
- Date: Wed, 22 Jan 2003 21:49:45 -0500 (EST)
- Subject: Picking one solution to the "struct cpp_reader" protos.h problem
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?
Thanks,
--Kaveh
--
Kaveh R. Ghazi ghazi@caip.rutgers.edu