This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch ping (i386 backend, configury)
>>> +ifeq ($(filter-out -O0,$(filter -O%,$(CFLAGS))),)
>> More easily understood and more precise if written as:
>>
>> ifeq ($(lastword $(filter -O%,$(CFLAGS))),-O0)
>
> This behaves differently. The filter-out will be true
> if either no -O* option is used at all, or -O0 is present,
> your version is true if the last -O* option is -O0 (that's more precise),
> but won't match the case when no -O* is used (the default).
> Perhaps
> ifeq ($(filter-out -O0,$(lastword $(filter -O%,$(CFLAGS)))),)
> ?
Right and yes.