# HG changeset patch # User David A. Holland # Date 1373478487 14400 # Node ID 63414cddf09cdf9ff57c9283327b3e2c95f0be1f # Parent 904f7a9827e332c826f67e94227cf59c3a6ed189 Accept and ignore -m32. I thought this had been handled a long time back, but apparently not. :-? diff -r 904f7a9827e3 -r 63414cddf09c CHANGES --- a/CHANGES Wed Jul 10 02:03:26 2013 -0400 +++ b/CHANGES Wed Jul 10 13:48:07 2013 -0400 @@ -1,3 +1,8 @@ +pending + - Fix stupid build problem introduced in 0.3.1. + - Accept and ignore -m32. I thought this had already been done, but + apparently not. + release 0.3.1 (20130709) - Don't leak memory and assert if a bad command-line option comes after a -D or a -include foo. diff -r 904f7a9827e3 -r 63414cddf09c main.c --- a/main.c Wed Jul 10 02:03:26 2013 -0400 +++ b/main.c Wed Jul 10 13:48:07 2013 -0400 @@ -83,9 +83,6 @@ .unused = false, }; -/* this is always true, but can be set explicitly with -traditional */ -static bool traditional = true; - //////////////////////////////////////////////////////////// // commandline macros @@ -735,6 +732,10 @@ //////////////////////////////////////////////////////////// // options +struct ignore_option { + const char *string; +}; + struct flag_option { const char *string; bool *flag; @@ -756,6 +757,12 @@ void (*func)(const struct place *, char *); }; +static const struct ignore_option ignore_options[] = { + { "m32" }, + { "traditional" }, +}; +static const unsigned num_ignore_options = HOWMANY(ignore_options); + static const struct flag_option flag_options[] = { { "C", &mode.output_retain_comments, true }, { "CC", &mode.output_retain_comments, true }, @@ -775,7 +782,6 @@ { "fdollars-in-identifiers", &mode.input_allow_dollars, true }, { "fno-dollars-in-identifiers", &mode.input_allow_dollars, false }, { "nostdinc", &mode.do_stdinc, false }, - { "traditional", &traditional, true }, { "undef", &mode.do_stddef, false }, }; static const unsigned num_flag_options = HOWMANY(flag_options); @@ -825,6 +831,25 @@ static bool +check_ignore_option(const char *opt) +{ + unsigned i; + int r; + + for (i=0; i