Make error when use SUBTARGET_OVERRIDE_OPTIONS macro
Dong Phuong
dongphuong2410@yahoo.com
Thu Nov 13 10:09:00 GMT 2008
Oh yes, it's my mistake.
I've got some grammar mistake in my code, so it didn't
run.
Thank you .
--- Michael Meissner <meissner@linux.vnet.ibm.com>
wrote:
> On Wed, Nov 12, 2008 at 01:43:50AM -0800, Dong
> Phuong wrote:
> >
> > In the file target.c, I declare
> > SUBTARGET_OVERRIDE_OPTIONS to add more command
> options
> > for my target :
> >
> >
>
------------------------------------------------------
> > #ifndef SUBTARGET_OVERRIDE_OPTIONS
> > #define SUBTARGET_OVERRIDE_OPTIONS
> > #endif
> >
> > #define OVERRIDE_OPTIONS \
> > { \
> > {"model=", &c166_model_string, \
> > N_("Code size : small, medium or large")} \
> > SUBTARGET_OVERRIDE_OPTIONS \
> > }
> >
>
------------------------------------------------------
> >
> > But when I use "make" to build, it generates error
> > when parse file "toplev.c"
> >
> > ../../GCC-C166/gcc/toplev.c : 5064: error: parse
> > error before } token.
> >
> > When I ran to line 5064 of file toplev.c , I saw
> this
> > :
> >
> >
>
-------------------------------------------------------
> > #ifdef OVERRIDE_OPTIONS
> > /* Some machines may reject certain combinations
> of
> > options. */
> > OVERRIDE_OPTIONS; <----------------- error line
> here
> > #endif
> >
>
-------------------------------------------------------
> >
> > So can you tell me why does it generate this error
> ?
> > Thank you very much !
>
> You can use -save-temps to look at the output of the
> preprocessor before the
> compiler proper. Looking at the definition, I
> suspect you need an initial
> comma (',') before the other options, the the }
> after the model= option does
> not have a comma.
>
> --
> Michael Meissner, IBM
> 4 Technology Place Drive, MS 2203A, Westford, MA,
> 01886, USA
> meissner@linux.vnet.ibm.com
>
More information about the Gcc
mailing list