From 5a6bb57eb9ad3397408aedca5c362ef36340a907 Mon Sep 17 00:00:00 2001 From: Janis Johnson Date: Mon, 14 May 2007 23:45:40 +0000 Subject: expr.c (cpp_classify_number): Warn about dfp constant for -pedantic. libcpp/ * expr.c (cpp_classify_number): Warn about dfp constant for -pedantic. gcc/testsuite/ * gcc.dg/fltconst-pedantic-dfp.c: New test. From-SVN: r124731 --- gcc/testsuite/ChangeLog | 2 ++ gcc/testsuite/gcc.dg/fltconst-pedantic-dfp.c | 6 ++++++ 2 files changed, 8 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/fltconst-pedantic-dfp.c (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b195815..159cee5 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,7 @@ 2007-05-14 Janis Johnson + * expr.c (cpp_classify_number): Warn about dfp constant for -pedantic. + PR c/31924 * gcc.dg/fltconst-1.c: New test. diff --git a/gcc/testsuite/gcc.dg/fltconst-pedantic-dfp.c b/gcc/testsuite/gcc.dg/fltconst-pedantic-dfp.c new file mode 100644 index 0000000..d0d1c4c --- /dev/null +++ b/gcc/testsuite/gcc.dg/fltconst-pedantic-dfp.c @@ -0,0 +1,6 @@ +/* { dg-do compile } */ +/* { dg-options "-pedantic" } */ + +double a = 1.dl; /* { dg-warning "decimal float" } */ +double b = 1.df; /* { dg-warning "decimal float" } */ +double c = 1.dd; /* { dg-warning "decimal float" } */ -- cgit v1.1