public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/39037] New: FLOAT_CONST_DECIMAL64 pragma not supported
@ 2009-01-30 2:13 tydeman at tybor dot com
2009-01-30 18:30 ` [Bug c/39037] " janis at gcc dot gnu dot org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: tydeman at tybor dot com @ 2009-01-30 2:13 UTC (permalink / raw)
To: gcc-bugs
Using gcc 4.3.2-7 on Intel Pentium 4 running Linux Fedora Core 10 with
-std=gnu99
/* DFP TR 24732 == WG14 / N1312 */
#define __STDC_WANT_DEC_FP__ /* Tell implementation that we want Decimal FP */
#pragma STDC FLOAT_CONST_DECIMAL64 ON /* unsuffixed => Decimal (not Binary) */
_Decimal64 d10 = 1.0DD / 3.0 ; /* 3.0 should be treated as 3.0DD */
gets:
test7.c:5: warning: ISO C does not support decimal floating point
test7.c:5:18: warning: decimal float constants are a GCC extension
test7.c:5: error: can't mix operands of decimal float and other float types
NOTE: This pragma is new with WG14 N1312 version of Decimal Floating Point
Technical Report (it replaced Translation Time Data Type (TTDT)).
--
Summary: FLOAT_CONST_DECIMAL64 pragma not supported
Product: gcc
Version: 4.3.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tydeman at tybor dot com
GCC host triplet: 4.3.2
GCC target triplet: 4.3.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39037
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c/39037] FLOAT_CONST_DECIMAL64 pragma not supported
2009-01-30 2:13 [Bug c/39037] New: FLOAT_CONST_DECIMAL64 pragma not supported tydeman at tybor dot com
@ 2009-01-30 18:30 ` janis at gcc dot gnu dot org
2009-01-30 18:42 ` hjl dot tools at gmail dot com
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: janis at gcc dot gnu dot org @ 2009-01-30 18:30 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from janis at gcc dot gnu dot org 2009-01-30 18:30 -------
Is N1312 available online? I had not heard of any version later than N1290.
--
janis at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bje at gcc dot gnu dot org,
| |hjl at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39037
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c/39037] FLOAT_CONST_DECIMAL64 pragma not supported
2009-01-30 2:13 [Bug c/39037] New: FLOAT_CONST_DECIMAL64 pragma not supported tydeman at tybor dot com
2009-01-30 18:30 ` [Bug c/39037] " janis at gcc dot gnu dot org
@ 2009-01-30 18:42 ` hjl dot tools at gmail dot com
2009-01-30 22:03 ` janis at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-01-30 18:42 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from hjl dot tools at gmail dot com 2009-01-30 18:41 -------
(In reply to comment #1)
> Is N1312 available online? I had not heard of any version later than N1290.
>
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1312.pdf
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39037
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c/39037] FLOAT_CONST_DECIMAL64 pragma not supported
2009-01-30 2:13 [Bug c/39037] New: FLOAT_CONST_DECIMAL64 pragma not supported tydeman at tybor dot com
2009-01-30 18:30 ` [Bug c/39037] " janis at gcc dot gnu dot org
2009-01-30 18:42 ` hjl dot tools at gmail dot com
@ 2009-01-30 22:03 ` janis at gcc dot gnu dot org
2009-05-07 22:34 ` janis at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: janis at gcc dot gnu dot org @ 2009-01-30 22:03 UTC (permalink / raw)
To: gcc-bugs
--
janis at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |janis at gcc dot gnu dot org
|dot org |
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2009-01-30 22:03:26
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39037
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c/39037] FLOAT_CONST_DECIMAL64 pragma not supported
2009-01-30 2:13 [Bug c/39037] New: FLOAT_CONST_DECIMAL64 pragma not supported tydeman at tybor dot com
` (2 preceding siblings ...)
2009-01-30 22:03 ` janis at gcc dot gnu dot org
@ 2009-05-07 22:34 ` janis at gcc dot gnu dot org
2010-01-13 23:15 ` janis at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: janis at gcc dot gnu dot org @ 2009-05-07 22:34 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from janis at gcc dot gnu dot org 2009-05-07 22:34 -------
Subject: Bug 39037
Author: janis
Date: Thu May 7 22:34:08 2009
New Revision: 147259
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=147259
Log:
gcc/
PR c/39037
* c-common.h (mark_valid_location_for_stdc_pragma,
valid_location_for_stdc_pragma_p, set_float_const_decimal64,
clear_float_const_decimal64, float_const_decimal64_p): New.
* c.opt (Wunsuffixed-float-constants): New.
* c-lex.c (interpret_float): Use pragma FLOAT_CONST_DECIMAL64 for
unsuffixed float constant, handle new warning.
* c-cppbuiltin.c (c_cpp_builtins): Use cast for double constants.
* c-decl.c (c_scope): New flag float_const_decimal64.
(set_float_const_decimal64, clear_float_const_decimal64,
float_const_decimal64_p): New.
(push_scope): Set new flag.
* c-parser.c (c_parser_translation_unit): Mark when it's valid
to use STDC pragmas.
(c_parser_external_declaration): Ditto.
(c_parser_compound_statement_nostart): Ditto.
* c-pragma.c (valid_location_for_stdc_pragma,
mark_valid_location_for_stdc_pragma,
valid_location_for_stdc_pragma_p, handle_stdc_pragma,
handle_pragma_float_const_decimal64): New.
(init_pragma): Register new pragma FLOAT_CONST_DECIMAL64.
* cp/semantics.c (valid_location_for_stdc_pragma_p,
set_float_const_decimal64, clear_float_const_decimal64,
float_const_decimal64_p): New dummy functions.
* doc/extend.texi (Decimal Float): Remove statement that the
pragma, and suffix for double constants, are not supported.
* doc/invoke.texi (Warning Options): List new option.
(-Wunsuffixed-float-constants): New.
gcc/testsuite
PR c/39037
* gcc.dg/Wunsuffixed-float-constants-1.c: New test.
* gcc.dg/cpp/pragma-float-const-decimal64-1.c: New test.
* gcc.dg/dfp/float-constant-double.c: New test.
* gcc.dg/dfp/pragma-float-const-decimal64-1.c: New test.
* gcc.dg/dfp/pragma-float-const-decimal64-2.c: New test.
* gcc.dg/dfp/pragma-float-const-decimal64-3.c: New test.
* gcc.dg/dfp/pragma-float-const-decimal64-4.c: New test.
* gcc.dg/dfp/pragma-float-const-decimal64-5.c: New test.
* gcc.dg/dfp/pragma-float-const-decimal64-6.c: New test.
* gcc.dg/dfp/pragma-float-const-decimal64-7.c: New test.
* gcc.dg/dfp/pragma-float-const-decimal64-8.c: New test.
* g++.dg/cpp/pragma-float-const-decimal64-1.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/cpp/pragma-float-const-decimal64-1.C
trunk/gcc/testsuite/gcc.dg/Wunsuffixed-float-constants-1.c
trunk/gcc/testsuite/gcc.dg/cpp/pragma-float-const-decimal64-1.c
trunk/gcc/testsuite/gcc.dg/dfp/float-constant-double.c
trunk/gcc/testsuite/gcc.dg/dfp/pragma-float-const-decimal64-1.c
trunk/gcc/testsuite/gcc.dg/dfp/pragma-float-const-decimal64-2.c
trunk/gcc/testsuite/gcc.dg/dfp/pragma-float-const-decimal64-3.c
trunk/gcc/testsuite/gcc.dg/dfp/pragma-float-const-decimal64-4.c
trunk/gcc/testsuite/gcc.dg/dfp/pragma-float-const-decimal64-5.c
trunk/gcc/testsuite/gcc.dg/dfp/pragma-float-const-decimal64-6.c
trunk/gcc/testsuite/gcc.dg/dfp/pragma-float-const-decimal64-7.c
trunk/gcc/testsuite/gcc.dg/dfp/pragma-float-const-decimal64-8.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/c-common.h
trunk/gcc/c-cppbuiltin.c
trunk/gcc/c-decl.c
trunk/gcc/c-lex.c
trunk/gcc/c-parser.c
trunk/gcc/c-pragma.c
trunk/gcc/c.opt
trunk/gcc/cp/semantics.c
trunk/gcc/doc/extend.texi
trunk/gcc/doc/invoke.texi
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39037
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c/39037] FLOAT_CONST_DECIMAL64 pragma not supported
2009-01-30 2:13 [Bug c/39037] New: FLOAT_CONST_DECIMAL64 pragma not supported tydeman at tybor dot com
` (3 preceding siblings ...)
2009-05-07 22:34 ` janis at gcc dot gnu dot org
@ 2010-01-13 23:15 ` janis at gcc dot gnu dot org
2010-04-07 10:58 ` vincent at vinc17 dot org
2010-04-07 11:06 ` rguenth at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: janis at gcc dot gnu dot org @ 2010-01-13 23:15 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from janis at gcc dot gnu dot org 2010-01-13 23:15 -------
This is fixed for GCC 4.5.0.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39037
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c/39037] FLOAT_CONST_DECIMAL64 pragma not supported
2009-01-30 2:13 [Bug c/39037] New: FLOAT_CONST_DECIMAL64 pragma not supported tydeman at tybor dot com
` (4 preceding siblings ...)
2010-01-13 23:15 ` janis at gcc dot gnu dot org
@ 2010-04-07 10:58 ` vincent at vinc17 dot org
2010-04-07 11:06 ` rguenth at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: vincent at vinc17 dot org @ 2010-04-07 10:58 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from vincent at vinc17 dot org 2010-04-07 10:58 -------
This bug should probably be resolved as fixed as well.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39037
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c/39037] FLOAT_CONST_DECIMAL64 pragma not supported
2009-01-30 2:13 [Bug c/39037] New: FLOAT_CONST_DECIMAL64 pragma not supported tydeman at tybor dot com
` (5 preceding siblings ...)
2010-04-07 10:58 ` vincent at vinc17 dot org
@ 2010-04-07 11:06 ` rguenth at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-04-07 11:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from rguenth at gcc dot gnu dot org 2010-04-07 11:06 -------
Fixed.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.5.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39037
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2010-04-07 11:06 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-30 2:13 [Bug c/39037] New: FLOAT_CONST_DECIMAL64 pragma not supported tydeman at tybor dot com
2009-01-30 18:30 ` [Bug c/39037] " janis at gcc dot gnu dot org
2009-01-30 18:42 ` hjl dot tools at gmail dot com
2009-01-30 22:03 ` janis at gcc dot gnu dot org
2009-05-07 22:34 ` janis at gcc dot gnu dot org
2010-01-13 23:15 ` janis at gcc dot gnu dot org
2010-04-07 10:58 ` vincent at vinc17 dot org
2010-04-07 11:06 ` rguenth 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).