Make --prenodef work more sensibly, remove caveat

--prenodef was causing the preprocessor-specific options (like -std=c99 for gcpp or -V199901L for mcpp) to be omitted. That makes no sense; '-p ext' should be used when custom options are desired (also modify the text that mentions it to make that clearer). Only the macros should be omitted.

The comment that warned about side effects with the order of --prenodef with respect to -p no longer applies, so remove it.
This commit is contained in:
Sei Lisa 2018-10-15 21:11:46 +02:00
parent 73599e0b04
commit 1207275a1e

View file

@ -225,14 +225,11 @@ Options marked with * are used to define the preprocessor macros __AGENTID__,
__AGENTKEY__, __AGENTIDRAW__, __AGENTNAME__, __ASSETID__ and __SHORTFILE__,
and have no effect if --prenodef is specified.
Using --prenodef before -p causes no macros whatsoever to be defined. If used
after -p, the type casting macros string(...), key(...), etc. will be defined.
If filename is a dash (-) then standard input is used.
Use: {progname} -O help for help on the optimizer control options.
Preprocessor modes:
ext Invoke preprocessor
ext Invoke a preprocessor with no default parameters
mcpp Invoke mcpp as preprocessor, setting default parameters pertinent
to it. Implies --precmd=mcpp
gcpp Invoke GNU cpp as preprocessor, setting default parameters
@ -583,7 +580,6 @@ def main(argv):
# Build preprocessor command line
preproc_cmdline = [preproc_command] + preproc_user_args
if predefines:
if preproc == 'gcpp':
preproc_cmdline += [
'-undef', '-x', 'c', '-std=c99', '-nostdinc',
@ -596,6 +592,7 @@ def main(argv):
'-V199901L',
]
if predefines:
preproc_cmdline += [
'-Dinteger(...)=((integer)(__VA_ARGS__))',
'-Dfloat(...)=((float)(__VA_ARGS__))',