From: Matthias Braun Date: Fri, 28 Nov 2008 09:40:47 +0000 (+0000) Subject: crude implementation of -Wp X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=20bc850757a10ab289370e9e46d11f25f43fb5d7;p=cparser crude implementation of -Wp [r24098] --- diff --git a/main.c b/main.c index b9b62e1..fefaa38 100644 --- a/main.c +++ b/main.c @@ -828,13 +828,19 @@ int main(int argc, char **argv) strncpy(cpu_arch, opt, sizeof(cpu_arch)); } } else if (option[0] == 'W') { - if (strstart(option + 1, "l,")) // a gcc-style linker option - { + if (option[1] == 'p') { + // pass options directly to the preprocessor + const char *opt; + GET_ARG_AFTER(opt, "-Wp,"); + add_flag(&cppflags_obst, "-Wp,%s", opt); + } else if (strstart(option + 1, "l,")) { + // pass options directly to the linker const char *opt; GET_ARG_AFTER(opt, "-Wl,"); add_flag(&ldflags_obst, "-Wl,%s", opt); + } else { + set_warning_opt(&option[1]); } - else set_warning_opt(&option[1]); } else if (option[0] == 'm') { /* -m options */ const char *opt;