This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
unknown bound: array error.
- To: gcc help <gcc-help at gcc dot gnu dot org>
- Subject: unknown bound: array error.
- From: "Mark J. Turick" <mturick at mrburns dot npt dot nuwc dot navy dot mil>
- Date: Mon, 09 Jul 2001 12:37:02 -0400
- Organization: Logicon, Inc.
I have a large amount of legacy code for a project that we support
on
various unix platforms. Some of the internal structures are defined
as:
typedef struct {
int xpos;
int ypos;
} XYCoordStruct, (*XYCoordPtr)[];
Note the pointer/array declaration. My belief is that at some point
in
Ancient times someone scattered those about to solve some array
problems they may have had with a ** declared variable.
This has never caused us a problem until I tried compiling with GCC
3.0
on Linux and Solaris 8. Gcc is complaining about function calls
using the
variables. Worst thing is, its treating this as an error, not a
warning.
ouch.
/diska/INCLUDE/libData.h:236: parameter `rpts' includes
pointer to array of unknown bound `XYCoordStruct[]
where "libData.h" has a call like this:
int libdReturnVCoords (
libfHandle, int id_index, int time, int npts,
XYCoordPtr rpts, int *nearest );
I think that I've fairly exhaustively examined all the documentation
concerning command line switches, and any that seem like they might
help, haven't.
Does anyone know of a switch that will allow gcc to let these
through
without complaint? There is too much code (that works fine with
all the
other compilers we use) to change, so that isn't an option.
Thanks.
--
-MJT
[==========================================]
Mark J. Turick
mailto:mturick@mrburns npt nuwc navy mil
[==========================================]