RFC: #pragma optimization_level

Robert Dewar dewar@adacore.com
Mon Apr 4 01:08:00 GMT 2005


Georg Bauhaus wrote:

> Though what GCC does for a compilation unit with Ada's pragma
> Optimize(Off); inside it is close to what some users seem to be wanting
> in C.
> GCC does complain about an attempt to translate the program below
> with optimization turned on:

> 
> $ gcc -gnatv -c -O2 opt.adb
> ...
>     2.    pragma optimize(Off);
>           |
>        >>> warning: must specify -O0

That's what I mean by pretty much ignoring the pragma. It is
supposed to affect the optimization, not just check that you
being consistent!




More information about the Gcc mailing list