public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/14635] New: nan functions should not be C90 built-ins
@ 2004-03-18 16:40 jsm28 at gcc dot gnu dot org
  2004-03-18 17:04 ` [Bug c/14635] [3.3/3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2004-03-18 16:40 UTC (permalink / raw)
  To: gcc-bugs

The built-in functions nan, nanf, nanl, nans, nansf, nansl are not
part of C90; they should not be built in in C90 mode.  nans* are
not in C99 either.  Furthermore, the treatment of these as constant
expressions in some cases means they shouldn't be built in at all
with the names nan*, only with the __builtin_nan* names.  This accords
with the manual, which only documents them with those names and not as
nan*.

A patch is in testing; this PR is to record the issue as a regression
in 3.4 relative to 3.2.x and earlier.  (The same bug is in 3.3.3 but
would need a separate patch there as builtins.def has been reorganised
since then.)

-- 
           Summary: nan functions should not be C90 built-ins
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jsm28 at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org,mark at codesourcery dot
                    com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14635


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c/14635] [3.3/3.4/3.5 Regression] nan functions should not be C90 built-ins
  2004-03-18 16:40 [Bug c/14635] New: nan functions should not be C90 built-ins jsm28 at gcc dot gnu dot org
@ 2004-03-18 17:04 ` pinskia at gcc dot gnu dot org
  2004-03-20  0:07 ` mmitchel at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-18 17:04 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-03-18 17:04 -------
Confirmed:
DEF_LIB_BUILTIN        (BUILT_IN_NAN, "nan", BT_FN_DOUBLE_CONST_STRING, 
ATTR_CONST_NOTHROW_NONNULL_1)
DEF_LIB_BUILTIN        (BUILT_IN_NANF, "nanf", BT_FN_FLOAT_CONST_STRING, 
ATTR_CONST_NOTHROW_NONNULL_1)
DEF_LIB_BUILTIN        (BUILT_IN_NANL, "nanl", BT_FN_LONGDOUBLE_CONST_STRING, 
ATTR_CONST_NOTHROW_NONNULL_1)
DEF_LIB_BUILTIN        (BUILT_IN_NANS, "nans", BT_FN_DOUBLE_CONST_STRING, 
ATTR_CONST_NOTHROW_NONNULL_1)
DEF_LIB_BUILTIN        (BUILT_IN_NANSF, "nansf", BT_FN_FLOAT_CONST_STRING, 
ATTR_CONST_NOTHROW_NONNULL_1)
DEF_LIB_BUILTIN        (BUILT_IN_NANSL, "nansl", BT_FN_LONGDOUBLE_CONST_STRING, 
ATTR_CONST_NOTHROW_NONNULL_1)
D
Some of them should be DEF_C99_BUILTIN or DEF_C99_C90RES_BUILTIN and the others 
DEF_EXT_LIB_BUILTIN.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |wrong-code
   Last reconfirmed|0000-00-00 00:00:00         |2004-03-18 17:04:09
               date|                            |
            Summary|nan functions should not be |[3.3/3.4/3.5 Regression] nan
                   |C90 built-ins               |functions should not be C90
                   |                            |built-ins
   Target Milestone|---                         |3.3.4


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14635


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c/14635] [3.3/3.4/3.5 Regression] nan functions should not be C90 built-ins
  2004-03-18 16:40 [Bug c/14635] New: nan functions should not be C90 built-ins jsm28 at gcc dot gnu dot org
  2004-03-18 17:04 ` [Bug c/14635] [3.3/3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
@ 2004-03-20  0:07 ` mmitchel at gcc dot gnu dot org
  2004-03-20  0:13 ` jsm at polyomino dot org dot uk
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-03-20  0:07 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-03-20 00:07 -------
Is the testing for the patch mentioned in this PR complete?

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14635


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c/14635] [3.3/3.4/3.5 Regression] nan functions should not be C90 built-ins
  2004-03-18 16:40 [Bug c/14635] New: nan functions should not be C90 built-ins jsm28 at gcc dot gnu dot org
  2004-03-18 17:04 ` [Bug c/14635] [3.3/3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
  2004-03-20  0:07 ` mmitchel at gcc dot gnu dot org
@ 2004-03-20  0:13 ` jsm at polyomino dot org dot uk
  2004-03-20  2:05 ` mark at codesourcery dot com
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: jsm at polyomino dot org dot uk @ 2004-03-20  0:13 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From jsm at polyomino dot org dot uk  2004-03-20 00:13 -------
Subject: Re:  [3.3/3.4/3.5 Regression] nan functions should not
 be C90 built-ins

On Sat, 20 Mar 2004, mmitchel at gcc dot gnu dot org wrote:

> Is the testing for the patch mentioned in this PR complete?

The testing is complete, but it generated some discussion of the correct
approach (<http://gcc.gnu.org/ml/gcc-patches/2004-03/msg01513.html> and
subsequent thread).



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14635


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c/14635] [3.3/3.4/3.5 Regression] nan functions should not be C90 built-ins
  2004-03-18 16:40 [Bug c/14635] New: nan functions should not be C90 built-ins jsm28 at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2004-03-20  0:13 ` jsm at polyomino dot org dot uk
@ 2004-03-20  2:05 ` mark at codesourcery dot com
  2004-03-20  3:47 ` gdr at integrable-solutions dot net
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: mark at codesourcery dot com @ 2004-03-20  2:05 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mark at codesourcery dot com  2004-03-20 02:05 -------
Subject: Re:  [3.3/3.4/3.5 Regression] nan functions should not
 be C90 built-ins

jsm at polyomino dot org dot uk wrote:

> The testing is complete, but it generated some discussion of the correct
>
>approach (<http://gcc.gnu.org/ml/gcc-patches/2004-03/msg01513.html> and
>subsequent thread).
>  
>

I think your patch is sufficiently correct that you should go ahead and 
check it in.

On the mainline, you can continue to search for an even-more-optimal 
solution.



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14635


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c/14635] [3.3/3.4/3.5 Regression] nan functions should not be C90 built-ins
  2004-03-18 16:40 [Bug c/14635] New: nan functions should not be C90 built-ins jsm28 at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2004-03-20  2:05 ` mark at codesourcery dot com
@ 2004-03-20  3:47 ` gdr at integrable-solutions dot net
  2004-03-20 10:19 ` cvs-commit at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: gdr at integrable-solutions dot net @ 2004-03-20  3:47 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From gdr at integrable-solutions dot net  2004-03-20 03:47 -------
Subject: Re:  [3.3/3.4/3.5 Regression] nan functions should not be C90 built-ins

"mark at codesourcery dot com" <gcc-bugzilla@gcc.gnu.org> writes:

| Subject: Re:  [3.3/3.4/3.5 Regression] nan functions should not
|  be C90 built-ins
| 
| jsm at polyomino dot org dot uk wrote:
| 
| > The testing is complete, but it generated some discussion of the correct
| >
| >approach (<http://gcc.gnu.org/ml/gcc-patches/2004-03/msg01513.html> and
| >subsequent thread).
| >  
| >
| 
| I think your patch is sufficiently correct that you should go ahead and 
| check it in.

I would suggest the same think for gcc-3_3-branch

-- gaby


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14635


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c/14635] [3.3/3.4/3.5 Regression] nan functions should not be C90 built-ins
  2004-03-18 16:40 [Bug c/14635] New: nan functions should not be C90 built-ins jsm28 at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2004-03-20  3:47 ` gdr at integrable-solutions dot net
@ 2004-03-20 10:19 ` cvs-commit at gcc dot gnu dot org
  2004-03-20 10:22 ` cvs-commit at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-03-20 10:19 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-03-20 10:19 -------
Subject: Bug 14635

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	jsm28@gcc.gnu.org	2004-03-20 10:19:11

Modified files:
	gcc            : ChangeLog builtins.def 
	gcc/testsuite  : ChangeLog 
	gcc/testsuite/gcc.dg: builtins-1.c builtins-30.c 
Added files:
	gcc/testsuite/gcc.dg: builtins-35.c 

Log message:
	PR c/14635
	* builtins.def (nan, nanf, nanl, nans, nansf, nansl): Change to
	DEF_GCC_BUILTIN.
	
	testsuite:
	* builtins-1.c (nan, nans): Don't test.
	* builtins-30.c: Don't use nan, nanf, nanl.
	* builtins-35.c: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.3226&r2=2.3227
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/builtins.def.diff?cvsroot=gcc&r1=1.76&r2=1.77
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3621&r2=1.3622
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/builtins-35.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/builtins-1.c.diff?cvsroot=gcc&r1=1.9&r2=1.10
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/builtins-30.c.diff?cvsroot=gcc&r1=1.2&r2=1.3



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14635


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c/14635] [3.3/3.4/3.5 Regression] nan functions should not be C90 built-ins
  2004-03-18 16:40 [Bug c/14635] New: nan functions should not be C90 built-ins jsm28 at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2004-03-20 10:19 ` cvs-commit at gcc dot gnu dot org
@ 2004-03-20 10:22 ` cvs-commit at gcc dot gnu dot org
  2004-06-11 22:22 ` [Bug c/14635] [3.3 " pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-03-20 10:22 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-03-20 10:22 -------
Subject: Bug 14635

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	jsm28@gcc.gnu.org	2004-03-20 10:22:39

Modified files:
	gcc            : ChangeLog builtins.def 
	gcc/testsuite  : ChangeLog 
	gcc/testsuite/gcc.dg: builtins-1.c builtins-30.c 
Added files:
	gcc/testsuite/gcc.dg: builtins-35.c 

Log message:
	PR c/14635
	* builtins.def (nan, nanf, nanl, nans, nansf, nansl): Change to
	DEF_GCC_BUILTIN.
	
	testsuite:
	* builtins-1.c (nan, nans): Don't test.
	* builtins-30.c: Don't use nan, nanf, nanl.
	* builtins-35.c: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.352&r2=2.2326.2.353
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/builtins.def.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.73.10.1&r2=1.73.10.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3389.2.152&r2=1.3389.2.153
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/builtins-35.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/builtins-1.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.8&r2=1.8.10.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/builtins-30.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.1.2.1&r2=1.1.2.2



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14635


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c/14635] [3.3 Regression] nan functions should not be C90 built-ins
  2004-03-18 16:40 [Bug c/14635] New: nan functions should not be C90 built-ins jsm28 at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2004-03-20 10:22 ` cvs-commit at gcc dot gnu dot org
@ 2004-06-11 22:22 ` pinskia at gcc dot gnu dot org
  2004-09-28 13:28 ` gdr at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-11 22:22 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.3.4                       |3.3.5


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14635


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c/14635] [3.3 Regression] nan functions should not be C90 built-ins
  2004-03-18 16:40 [Bug c/14635] New: nan functions should not be C90 built-ins jsm28 at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2004-06-11 22:22 ` [Bug c/14635] [3.3 " pinskia at gcc dot gnu dot org
@ 2004-09-28 13:28 ` gdr at gcc dot gnu dot org
  2004-11-26 23:07 ` neroden at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: gdr at gcc dot gnu dot org @ 2004-09-28 13:28 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From gdr at gcc dot gnu dot org  2004-09-28 13:28 -------
Adjust milestone

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.3.5                       |3.3.6


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14635


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c/14635] [3.3 Regression] nan functions should not be C90 built-ins
  2004-03-18 16:40 [Bug c/14635] New: nan functions should not be C90 built-ins jsm28 at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2004-09-28 13:28 ` gdr at gcc dot gnu dot org
@ 2004-11-26 23:07 ` neroden at gcc dot gnu dot org
  2004-11-26 23:12 ` joseph at codesourcery dot com
  2005-04-30 14:36 ` gdr at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: neroden at gcc dot gnu dot org @ 2004-11-26 23:07 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From neroden at gcc dot gnu dot org  2004-11-26 23:07 -------
This bug is fixed on mainline and 3.4.x; nan functions are not currently C90 
builtins.  Please open a different bug if there are other problems with nan 
builtin handling on mainline; meanwhile I'm marking 3.4.3 and 4.0.0 as 
known-to-work.  I believe this is currently open solely for the 3.3.x branch? 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |3.4.3 4.0.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14635


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c/14635] [3.3 Regression] nan functions should not be C90 built-ins
  2004-03-18 16:40 [Bug c/14635] New: nan functions should not be C90 built-ins jsm28 at gcc dot gnu dot org
                   ` (9 preceding siblings ...)
  2004-11-26 23:07 ` neroden at gcc dot gnu dot org
@ 2004-11-26 23:12 ` joseph at codesourcery dot com
  2005-04-30 14:36 ` gdr at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: joseph at codesourcery dot com @ 2004-11-26 23:12 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From joseph at codesourcery dot com  2004-11-26 23:12 -------
Subject: Re:  [3.3 Regression] nan functions should not be C90
 built-ins

On Fri, 26 Nov 2004, neroden at gcc dot gnu dot org wrote:

> This bug is fixed on mainline and 3.4.x; nan functions are not currently C90 
> builtins.  Please open a different bug if there are other problems with nan 
> builtin handling on mainline; meanwhile I'm marking 3.4.3 and 4.0.0 as 
> known-to-work.  I believe this is currently open solely for the 3.3.x branch? 

Yes, it's solely open for 3.3.x.



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14635


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c/14635] [3.3 Regression] nan functions should not be C90 built-ins
  2004-03-18 16:40 [Bug c/14635] New: nan functions should not be C90 built-ins jsm28 at gcc dot gnu dot org
                   ` (10 preceding siblings ...)
  2004-11-26 23:12 ` joseph at codesourcery dot com
@ 2005-04-30 14:36 ` gdr at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: gdr at gcc dot gnu dot org @ 2005-04-30 14:36 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From gdr at gcc dot gnu dot org  2005-04-30 14:36 -------
Patch does not apply to 3.3.6 source. closing as fixed in 3.4.x

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|3.3.6                       |3.4.2


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14635


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2005-04-30 14:36 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-18 16:40 [Bug c/14635] New: nan functions should not be C90 built-ins jsm28 at gcc dot gnu dot org
2004-03-18 17:04 ` [Bug c/14635] [3.3/3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
2004-03-20  0:07 ` mmitchel at gcc dot gnu dot org
2004-03-20  0:13 ` jsm at polyomino dot org dot uk
2004-03-20  2:05 ` mark at codesourcery dot com
2004-03-20  3:47 ` gdr at integrable-solutions dot net
2004-03-20 10:19 ` cvs-commit at gcc dot gnu dot org
2004-03-20 10:22 ` cvs-commit at gcc dot gnu dot org
2004-06-11 22:22 ` [Bug c/14635] [3.3 " pinskia at gcc dot gnu dot org
2004-09-28 13:28 ` gdr at gcc dot gnu dot org
2004-11-26 23:07 ` neroden at gcc dot gnu dot org
2004-11-26 23:12 ` joseph at codesourcery dot com
2005-04-30 14:36 ` gdr at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).