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).
This is in line with the POSIX description of the c99 command which
leaves the -O level unspecified if none is provided.
Martin