gcc/
commit3ae3a17fa65392ba6c577212dfc4863c24b9d21c
authorjanis <janis@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 7 May 2009 22:34:08 +0000 (7 22:34 +0000)
committerjanis <janis@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 7 May 2009 22:34:08 +0000 (7 22:34 +0000)
tree478b0f3a70632c6c119442bb4244b21106b8a03a
parentb00f78756b1cd3e6a4dfa2e705b5776b16d1cec2
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@147259 138bc75d-0d04-0410-961f-82ee72b054a4
24 files changed:
gcc/ChangeLog
gcc/c-common.h
gcc/c-cppbuiltin.c
gcc/c-decl.c
gcc/c-lex.c
gcc/c-parser.c
gcc/c-pragma.c
gcc/c.opt
gcc/cp/semantics.c
gcc/doc/extend.texi
gcc/doc/invoke.texi
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp/pragma-float-const-decimal64-1.C [new file with mode: 0644]
gcc/testsuite/gcc.dg/Wunsuffixed-float-constants-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/cpp/pragma-float-const-decimal64-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/dfp/float-constant-double.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/dfp/pragma-float-const-decimal64-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/dfp/pragma-float-const-decimal64-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/dfp/pragma-float-const-decimal64-3.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/dfp/pragma-float-const-decimal64-4.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/dfp/pragma-float-const-decimal64-5.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/dfp/pragma-float-const-decimal64-6.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/dfp/pragma-float-const-decimal64-7.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/dfp/pragma-float-const-decimal64-8.c [new file with mode: 0644]