pardo@JUNE.CS.WASHINGTON.EDU (04/25/89)
In `fu.h', I have a function definition for a function that takes a struct pointer. The struct pointer is not known in all clients of `fu.h'. The struct pointer is used as an abstract data type. I get a warning message. extern void f (struct rtl_t const *rtl); `fu.h':49: warning: `struct rtl_t' declared inside parameter list Now the question: why is this a warning? I could instead declare the struct to be an explicitly `empty' type, but that seems to me to be no more useful and it, too, will generate a warning message. ;-D on ( Curious in Seattle ) Pardo
shap@polya.Stanford.EDU (Jonathan S. Shapiro) (04/26/89)
In article <8904251426.AA14100@june.cs.washington.edu> pardo@JUNE.CS.WASHINGTON.EDU writes: >The struct pointer is used as an abstract data type. I get a >warning message. > > extern void > f (struct rtl_t const *rtl); > > `fu.h':49: warning: `struct rtl_t' declared inside parameter list This seems to be an error in the GNU compiler. Unless some silly ANSI-ness caused this to happen, the usage you are describing is valid, and sufficiently widely used that the compiler should not complain about it. Jon