Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!samsung!uunet!charyb!dan From: dan@charyb.COM (Dan Mick) Newsgroups: comp.lang.c Subject: Re: Is this a GCC bug ? Message-ID: <355@charyb.COM> Date: 1 Feb 90 04:50:43 GMT References: <7948@shlump.nac.dec.com> Reply-To: dan@charyb.UUCP (Dan Mick) Organization: KFW Corporation, Newbury Park, CA Lines: 34 In article <7948@shlump.nac.dec.com> nadkarni@ashok.dec.com writes: | |Is this a bug in the Gnu CC compiler or is it illegal C ? | |------------------------------ |typedef void foo(struct urb *p); | | |struct urb |{ | int i; |} ; |------------------------------- |gcc -S bug.c |bug.c:1: warning: `struct urb' declared inside parameter list |bug.c:1: warning: such a name is accessible only within its parameter list, |bug.c:1: warning: which is probably not what you want. | |Thanks, | |/Ashok Nadkarni |Digital Equipment Corp. It's possible I'm being incredibly dense again, but it seems to me that you need to define struct urb before you get to the typedef in order to avoid the warning; all it's telling you is that it doesn't know about struct urb until it sees the parameter list. True, the parm p is a struct urb * and not struct urb, so it doesn't need the size info, but until you define struct urb later, it's warning you that you can't use struct urb in any other context. The program still works, right?