docs: Unification of "enabled by default at -O{,1}
Martin Liška
mliska@suse.cz
Thu Jun 17 10:03:55 GMT 2021
On 6/16/21 7:13 PM, Martin Sebor wrote:
> On 6/11/21 6:53 AM, Martin Liška wrote:
>> Hello.
>>
>> First, note that -O is equal to -O1 :) I noticed we don't use it consistently
>> in documentation:
>>
>> $ git grep 'at.*-O1}' | cat
>>
>> gcc/ada/gnat_ugn.texi:pick it based on the optimization level: 1 for @code{-O1}, @code{-O2} or
>>
> ...
>> Is the later (and more common variant) preferred?
>
> I think -O1 should be preferred wherever the manual means to refer
> to -O1. It's clearer that way mainly because other compilers have
> different meanings for -O than GCC (e.g., in IBM XLC it corresponds
> to -O2 and in Oracle C it's equivalent to level 3).
Thanks for clarification! Makes sense.
>
> This is in line with the POSIX description of the c99 command which
> leaves the -O level unspecified if none is provided.
>
> Martin
Good, I'm going to apply the following patch.
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-docs-Use-O1-as-a-canonical-value-for-O-option.patch
Type: text/x-patch
Size: 13984 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20210617/6f431653/attachment.bin>
More information about the Gcc
mailing list