On Mon, 9 Mar 2009, Sylvain Pion wrote:

> - C++ does not have it, so what's the plan for C++ ?

That's for C++ maintainers, possibly guided by anything that goes in the 
C++ standard.

The pragma syntax is a fairly small part of the work, as would be control 
of the options at a per-function level.  The large parts would be:

* Disabling all problematic optimizations when the relevant options are 
set.

* Control on a per-operation level, so block-level pragmas don't act like 
function-level ones and you can inline functions with different settings 
without making the most conservative settings apply to the merged 
function.

Note that these large parts are language-independent.

> > GCC maintainers must also bear in mind the bulk of users for whom the
> > default options, complete with other issues such as x87 excess precision,
> > are just fine, and the value of good benchmark scores in marketing GCC.
> > (You will of course nevertheless note that I have fixed PR 323 for C for
> > 4.5.)
> 
> Yep, I did note, and this is impressive work.
> Though, as a C++ user, I won't see the benefit of it for now unfortunately :(

The C++ maintainers (or others) are of course free to implement 
appropriate semantics for C++.  (I don't think C++0x has followed C99 in 
providing any standard way to handle excess precision, but I imagine 
something reasonable and GCC-specific could be defined, just as I made 
GCC-specific interpretations of areas in which C99 was silent.  There has 
certainly been some suggestion that Fortran might wish to implement 
something <http://gcc.gnu.org/ml/fortran/2009-01/msg00332.html>.

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to