Re: prevent "undef var" errors on gcc --help or --version

2016-01-12 Thread Olivier Hainque
> On 12 Jan 2016, at 17:14, Bernd Schmidt wrote: > > I think you can do without the outer braces. Ok with those removed. Great! Thanks for the review and comments. With Kind Regards, Olivier

Re: prevent "undef var" errors on gcc --help or --version

2016-01-12 Thread Bernd Schmidt
On 01/12/2016 05:11 PM, Olivier Hainque wrote: + /* Decide if undefined variable references are allowed in specs. */ + { +/* --version and --help alone or together are safe. Note that -v would + make them unsafe, as they'd then be run for subprocesses as well, the + location

Re: prevent "undef var" errors on gcc --help or --version

2016-01-12 Thread Olivier Hainque
Hello Bernd, Thanks for your feedback on this :-) > On 11 Jan 2016, at 17:09, Bernd Schmidt wrote: > > On 01/08/2016 02:23 PM, Olivier Hainque wrote: >> + /* Undefined variable references in specs are harmless if >> + we're running for --help or --version alone, or together. */ >> + spec

Re: prevent "undef var" errors on gcc --help or --version

2016-01-11 Thread Bernd Schmidt
On 01/08/2016 02:23 PM, Olivier Hainque wrote: + /* Undefined variable references in specs are harmless if + we're running for --help or --version alone, or together. */ + spec_undefvar_allowed = +(((print_version || print_help_list) + && decoded_options_count == 2) + || +

prevent "undef var" errors on gcc --help or --version

2016-01-08 Thread Olivier Hainque
Hello, self-specs setup with configure --with-specs are allowed to contain %:getenv environment variable references. We are using this capability in a few cases for cross ports. In such configurations, gcc --help or gcc --version fail if the variables aren't defined, like so: gcc --version