git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1503
4a8a32a2-be11-0410-ad9d-
d568d2c75423
2001-11-04 Michael Hope <michaelh@juju.net.nz>
2001-11-04 Michael Hope <michaelh@juju.net.nz>
+ * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
+
* support/regression/tests/bug-478094.c: Added.
* src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
* support/regression/tests/bug-478094.c: Added.
* src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
{ 'M', NULL, NULL, "Preprocessor option" },
{ 'V', NULL, &verboseExec, "Execute verbosely. Show sub commands as they are run" },
{ 'S', NULL, &noAssemble, "Compile only; do not assemble or link" },
{ 'M', NULL, NULL, "Preprocessor option" },
{ 'V', NULL, &verboseExec, "Execute verbosely. Show sub commands as they are run" },
{ 'S', NULL, &noAssemble, "Compile only; do not assemble or link" },
- { 'W', NULL, NULL, "Pass through options to the assembler (a) or linker (l)" },
+ { 'W', NULL, NULL, "Pass through options to the pre-processor (p), assembler (a) or linker (l)" },
{ 'L', NULL, NULL, "Add the next field to the library search path" },
{ 'l', NULL, NULL, "Include the given library in the link" },
{ 0, OPTION_LARGE_MODEL, NULL, "external data space is used" },
{ 'L', NULL, NULL, "Add the next field to the library search path" },
{ 'l', NULL, NULL, "Include the given library in the link" },
{ 0, OPTION_LARGE_MODEL, NULL, "external data space is used" },
+ /* pre-processer options */
+ if (argv[i][2] == 'p')
+ {
+ parseWithComma ((char **)preArgv, getStringArg("-Wp", argv, &i, argc));
+ }
+ else if (argv[i][2] == 'l')
- parseWithComma(linkOptions, getStringArg("-Wl", argv, &i, argc));
- }
- else
- {
- /* assembler options */
- if (argv[i][2] == 'a')
- {
- parseWithComma ((char **) asmOptions, getStringArg("-Wa", argv, &i, argc));
- }
- else
- {
- werror (W_UNKNOWN_OPTION, argv[i]);
- }
+ parseWithComma(linkOptions, getStringArg("-Wl", argv, &i, argc));
+ /* assembler options */
+ else if (argv[i][2] == 'a')
+ {
+ parseWithComma ((char **) asmOptions, getStringArg("-Wa", argv, &i, argc));
+ }
+ else
+ {
+ werror (W_UNKNOWN_OPTION, argv[i]);
+ }
void
buildCmdLine (char *into, const char **cmds,
const char *p1, const char *p2,
void
buildCmdLine (char *into, const char **cmds,
const char *p1, const char *p2,
- const char *p3, const char **list)
+ const char *p3, const char * const *list)
- const char **tmp = list;
+ const char *const *tmp = list;
void
buildCmdLine (char *into, const char **cmds,
const char *p1, const char *p2,
void
buildCmdLine (char *into, const char **cmds,
const char *p1, const char *p2,
- const char *p3, const char **list) ;
+ const char *p3, const char * const *list) ;
+void f( int x )
+{
+ UNUSED(x);
+}