GCC 3.3 release criteria

Robert Dewar dewar@gnat.com
Tue Feb 25 13:12:00 GMT 2003


> Ideally, there should be switches that enables the compiler to report
> cases where it thinks it knows better than the programmer (no, the
> current behaviour of -Winline does not cover that case).

In GNAT, there is Inline, which is just advice as per the standard, and then
we added Inline_Always which must be obeyed. We also have an optional warning
if Inline is not obeyed.

Here is an example from the GNAT world where Inline_Always is crucial. In our
high integrity product that is to be certified following FAA certification
standards, we have certain simple functions that are written as separate
functions but generate no code at all (e.g. To_Address which converts between
two forms of addresses that in fact have the same representation). If this
is inlined, then there is no separate object file to be taken into account
during certification. So the issue here is reducing certification burden
and not efficiency. This is a good example of a case where the compiler
cannot understand that it is critical that this directive be obeyed.
An example where we absolutely do NOT want inlining is where the debugger
must intercept a call.



More information about the Gcc mailing list