warning 'struct soandso' defined in parameter list

I’m getting a warning about structure’s defined in my parameter list,
for some of my function prototypes for a library I’m porting from QNX4
(Watcom) to QNXRTP. What does this mean, how can I fix it, and most
importantly, where is the error message reference for QRTP, so I can try
to find answers to questions like this, on my own?

These are pointers to structures (struct soandso *), and it compiled ok
in Watcom.

Scott

QNXRTP compiler is GCC, there is no documentation for the GNU
compiler. You might want to look at www.gnu.org.

What type of error do you get, maybe this is just because the warning
level wasn’t high enough in Watcom.

“J. Scott Franko” <jsfranko@switch.com> wrote in message
news:39D8B082.8B65A5EF@switch.com

I’m getting a warning about structure’s defined in my parameter list,
for some of my function prototypes for a library I’m porting from QNX4
(Watcom) to QNXRTP. What does this mean, how can I fix it, and most
importantly, where is the error message reference for QRTP, so I can try
to find answers to questions like this, on my own?

These are pointers to structures (struct soandso *), and it compiled ok
in Watcom.

Scott

I encountered this error when I attempted to compile our C application using
wpp in QNX4. Watcom wcc will let you declare a pointer to an undefined
structure in a prototype. Follow your #includes back and verify your struct
soandso is actually declared prior to the prototype.

“J. Scott Franko” <jsfranko@switch.com> wrote in message
news:39D8B082.8B65A5EF@switch.com

I’m getting a warning about structure’s defined in my parameter list,
for some of my function prototypes for a library I’m porting from QNX4
(Watcom) to QNXRTP. What does this mean, how can I fix it, and most
importantly, where is the error message reference for QRTP, so I can try
to find answers to questions like this, on my own?

These are pointers to structures (struct soandso *), and it compiled ok
in Watcom.

Scott

Mario Charest wrote:

QNXRTP compiler is GCC, there is no documentation for the GNU
compiler. You might want to look at > www.gnu.org> .

If QSSL is converting us over to GCC, shouldn’t they provide the documentation
as well? I have printed watcom manuals, and online watcom manuals, why not at
least, online manuals for GCC? I’ll go hunting at gnu.org, but I’d sure like
to see the manuals in the helpviewer for GCC.

What type of error do you get, maybe this is just because the warning
level wasn’t high enough in Watcom.

It’s just a warning. Exact text as you see in the subject. What I’m trying
to learn is the rule’s of thumb for prototypes in GCC and why they are
different from watcom, and if I should worry about this or not, and which
warning level switch on the compile line I need to use to get rid of these,
if shouldn’t worry about them.

Watcom had a convenient message STRING, and listing of the messages with
suggest recovery options. I am wondering if there is this level of
documentation for GCC. I notice that the warnings don’t have a STRING code,
or even a number code.

“J. Scott Franko” <> jsfranko@switch.com> > wrote in message
news:> 39D8B082.8B65A5EF@switch.com> …
I’m getting a warning about structure’s defined in my parameter list,
for some of my function prototypes for a library I’m porting from QNX4
(Watcom) to QNXRTP. What does this mean, how can I fix it, and most
importantly, where is the error message reference for QRTP, so I can try
to find answers to questions like this, on my own?

These are pointers to structures (struct soandso *), and it compiled ok
in Watcom.

Scott

Robert Surtees wrote:

I encountered this error when I attempted to compile our C application using
wpp in QNX4. Watcom wcc will let you declare a pointer to an undefined
structure in a prototype. Follow your #includes back and verify your struct
soandso is actually declared prior to the prototype.

So WCC is forgiving, but not WPP. You nailed it for me. Only some of the
structures are defined before the prototypes try to use them as pointers. And
I think I found the reason why. There were attempts to put defines at the the
top of the header files to keep them from being included more than once, but not
everyone used the ifdef test before they included them. So somone attempted to
put the defines needed by the prototypes in the prototype header file, but they
are now commented out, most likely due to a double define encountered. GCC is
as unforgiving as WPP, so it seems.

“J. Scott Franko” <> jsfranko@switch.com> > wrote in message
news:> 39D8B082.8B65A5EF@switch.com> …
I’m getting a warning about structure’s defined in my parameter list,
for some of my function prototypes for a library I’m porting from QNX4
(Watcom) to QNXRTP. What does this mean, how can I fix it, and most
importantly, where is the error message reference for QRTP, so I can try
to find answers to questions like this, on my own?

These are pointers to structures (struct soandso *), and it compiled ok
in Watcom.

Scott

“J. Scott Franko” <jsfranko@switch.com> wrote in message
news:39DA1DD7.D93359B@switch.com

Robert Surtees wrote:

I encountered this error when I attempted to compile our C application
using
wpp in QNX4. Watcom wcc will let you declare a pointer to an undefined
structure in a prototype. Follow your #includes back and verify your
struct
soandso is actually declared prior to the prototype.

So WCC is forgiving, but not WPP. You nailed it for me. Only some of
the
structures are defined before the prototypes try to use them as pointers.
And
I think I found the reason why. There were attempts to put defines at the
the
top of the header files to keep them from being included more than once,
but not
everyone used the ifdef test before they included them. So somone
attempted to
put the defines needed by the prototypes in the prototype header file, but
they
are now commented out, most likely due to a double define encountered.
GCC is
as unforgiving as WPP, so it seems.

If you use max warning level in Watcom I’m pretty sure you would had a
warning
for this.

“J. Scott Franko” <> jsfranko@switch.com> > wrote in message
news:> 39D8B082.8B65A5EF@switch.com> …
I’m getting a warning about structure’s defined in my parameter list,
for some of my function prototypes for a library I’m porting from QNX4
(Watcom) to QNXRTP. What does this mean, how can I fix it, and most
importantly, where is the error message reference for QRTP, so I can
try
to find answers to questions like this, on my own?

These are pointers to structures (struct soandso *), and it compiled
ok
in Watcom.

Scott