This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/50724] cmath's floating-point classification implementations inconsistent with math.h
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 18 Oct 2011 09:41:50 +0000
- Subject: [Bug middle-end/50724] cmath's floating-point classification implementations inconsistent with math.h
- Auto-submitted: auto-generated
- References: <bug-50724-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50724
--- Comment #33 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-10-18 09:41:50 UTC ---
(In reply to comment #31)
> I can't add an attribute to the system isnan from my user code, or can I? I've
> never been quite sure what Paolo was referring to, can someone clue me in? It
> sounded like he was saying the builtins could be given an attribute to specify
> -fno-finite-math-only which would only affect their specific usage? Maybe he
> just meant I could apply different flags in different translation units of my
> own code, in which case I've misunderstood. Basically, what's the "new
> optimization attribute and pragma"?
Read the frabjous manual:
http://gcc.gnu.org/onlinedocs/gcc/Function-Specific-Option-Pragmas.html
http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html#index-g_t_0040code_007boptimize_007d-function-attribute-2496
You shouldn't need to put code in separate translation units, you can specify
different optimizations per function (though I haven't checked if that works
for -fno-finite-math-only)