public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Picking one solution to the "struct cpp_reader" protos.h problem
@ 2003-01-23 16:25 Kaveh R. Ghazi
  2003-01-23 17:07 ` Neil Booth
  2003-01-23 19:56 ` Stan Shebs
  0 siblings, 2 replies; 3+ messages in thread
From: Kaveh R. Ghazi @ 2003-01-23 16:25 UTC (permalink / raw)
  To: gcc; +Cc: neil, zack

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Picking one solution to the "struct cpp_reader" protos.h problem
  2003-01-23 16:25 Picking one solution to the "struct cpp_reader" protos.h problem Kaveh R. Ghazi
@ 2003-01-23 17:07 ` Neil Booth
  2003-01-23 19:56 ` Stan Shebs
  1 sibling, 0 replies; 3+ messages in thread
From: Neil Booth @ 2003-01-23 17:07 UTC (permalink / raw)
  To: Kaveh R. Ghazi; +Cc: gcc, zack

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Picking one solution to the "struct cpp_reader" protos.h problem
  2003-01-23 16:25 Picking one solution to the "struct cpp_reader" protos.h problem Kaveh R. Ghazi
  2003-01-23 17:07 ` Neil Booth
@ 2003-01-23 19:56 ` Stan Shebs
  1 sibling, 0 replies; 3+ messages in thread
From: Stan Shebs @ 2003-01-23 19:56 UTC (permalink / raw)
  To: Kaveh R. Ghazi; +Cc: gcc, neil, zack

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'm about ready to post #3, just needed to test it with a couple configs.
Sorry to take so long...

Stan



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-01-23 17:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-23 16:25 Picking one solution to the "struct cpp_reader" protos.h problem Kaveh R. Ghazi
2003-01-23 17:07 ` Neil Booth
2003-01-23 19:56 ` Stan Shebs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).