Bug 35162 - Documentation incorrect for -fcx-limited-range
Summary: Documentation incorrect for -fcx-limited-range
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c (show other bugs)
Version: 4.3.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-11 08:56 UTC by Janne Blomqvist
Modified: 2008-02-25 19:49 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Janne Blomqvist 2008-02-11 08:56:26 UTC
The documentation for -fcx-limited-range states:

@item -fcx-limited-range
@opindex fcx-limited-range
When enabled, this option states that a range reduction step is not
needed when performing complex division.  The default is
@option{-fno-cx-limited-range}, but is enabled by @option{-ffast-math}.

This option controls the default setting of the ISO C99
@code{CX_LIMITED_RANGE} pragma.  Nevertheless, the option applies to
all languages.

However, -fcx-limited-range (and the CX_LIMITED_RANGE pragma) affect multiplication and absolute value as well as division, since it's not only range reduction but also handling of FP exceptions. See Section 7.3.4 and Annex G in the C99 standard (assuming the FCD is close to the actual standard). 

At least for multiplication, it seems the actual code is correct, i.e. a call to mulsc in libgcc is done without -fcx-limited-range, so I guess it's only the documentation that needs to be updated.
Comment 1 Janne Blomqvist 2008-02-16 21:47:33 UTC
CC:ing jsm to confirm this bug as people on IRC tell me you're the person that knows about complex in C99. :)
Comment 2 jsm-csl@polyomino.org.uk 2008-02-17 22:48:35 UTC
Subject: Re:  Documentation incorrect for -fcx-limited-range

The bug report appears correct, though you should be referring to N1256 
<http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf>, the C99 
standard with TC1, TC2 and TC3 integrated, rather than to ancient drafts 
from before C99 was released.

Comment 3 Janne Blomqvist 2008-02-19 19:33:51 UTC
Patch here: http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00788.html
Comment 4 Janne Blomqvist 2008-02-25 19:17:23 UTC
Subject: Bug 35162

Author: jb
Date: Mon Feb 25 19:16:37 2008
New Revision: 132635

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=132635
Log:
2008-02-25  Janne Blomqvist  <jb@gcc.gnu.org>

	PR c/35162
	* doc/invoke.texi (-fcx-limited-range): Correct to be in line with
	actual behaviour and C99.
	

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/doc/invoke.texi

Comment 5 Janne Blomqvist 2008-02-25 19:49:19 UTC
Fixed on trunk; closing.