[RFA/C] Break out C options into a separate file
Graham Stott
graham.stott@btinternet.com
Sun Jun 1 15:35:00 GMT 2003
Kaveh,
Kaveh R. Ghazi wrote:
> > I've applied this.
> > Neil.
> > * opts.sh: Remove path from sort.
>
> Neil, I'm having lots of problems with your new code. Issues 3 & 4
> lead me to assume you checked in the wrong version of the patch and/or
> got something confused when testing it cause I don't see how it could
> have possibly worked. So far here are the problems I've encountered.
>
>
> 3. When I substitute gawk the script runs. However the resulting
> c-options.[ch] files cannot be compiled. c-options.c doesn't
> include c-options.h so it doesn't know about the cl_options
> struct.
c-options.c gets included in c-opts.c
>
> c-options.c:3: warning: array type has incomplete element type
> c-options.c:3: error: elements of array `cl_options' have incomplete type
What part of the build is trying to compile "c-options.c"?
>
> 4. If I hack opts.sh to insert #include "c-options.h" in c-options.c,
> then I get another error. The CL_* stuff are macros defined in
> c-opts.c, but not in c-options.[ch]. They need to be in a header:
>
> c-options.c:7: error: `CL_C' undeclared here (not in a function)
> c-options.c:7: error: `CL_OBJC' undeclared here (not in a function)
> c-options.c:7: error: `CL_CXX' undeclared here (not in a function)
> c-options.c:7: error: `CL_OBJCXX' undeclared here (not in a function)
>
These get defined on c-opts.c before c-options.c gets included
>
> At this point I gave up. Would you please take a look and ensure
> everything works correctly?
>
> Thanks,
> --Kaveh
> --
> Kaveh R. Ghazi ghazi@caip.rutgers.edu
>
Cheers
Graham
More information about the Gcc-patches
mailing list