X-Git-Url: https://oss.titaniummirror.com/gitweb?a=blobdiff_plain;f=libstdc%2B%2B-v3%2Ftestsuite%2F18_support%2Fheaders%2Fcfloat%2Fvalues.cc;fp=libstdc%2B%2B-v3%2Ftestsuite%2F18_support%2Fheaders%2Fcfloat%2Fvalues.cc;h=2019afea84941790af591c7b2ec01d738b1ca2cc;hb=6fed43773c9b0ce596dca5686f37ac3fc0fa11c0;hp=0000000000000000000000000000000000000000;hpb=27b11d56b743098deb193d510b337ba22dc52e5c;p=msp430-gcc.git diff --git a/libstdc++-v3/testsuite/18_support/headers/cfloat/values.cc b/libstdc++-v3/testsuite/18_support/headers/cfloat/values.cc new file mode 100644 index 00000000..2019afea --- /dev/null +++ b/libstdc++-v3/testsuite/18_support/headers/cfloat/values.cc @@ -0,0 +1,53 @@ +// { dg-do compile } + +// Copyright (C) 2007, 2009 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . + +#include + +namespace gnu +{ + double d1 = DBL_DIG; + double d2 = DBL_EPSILON; + double d3 = DBL_MANT_DIG; + double d4 = DBL_MAX; + double d5 = DBL_MAX_10_EXP; + double d6 = DBL_MAX_EXP; + double d7 = DBL_MIN; + double d8 = DBL_MIN_10_EXP; + double d9 = DBL_MIN_EXP; + + float f1 = FLT_DIG; + float f2 = FLT_EPSILON; + float f3 = FLT_MANT_DIG; + float f4 = FLT_MAX; + float f5 = FLT_MAX_10_EXP; + float f6 = FLT_MAX_EXP; + float f7 = FLT_MIN; + float f8 = FLT_MIN_10_EXP; + float f9 = FLT_MIN_EXP; + + long double ld1 = LDBL_DIG; + long double ld2 = LDBL_EPSILON; + long double ld3 = LDBL_MANT_DIG; + long double ld4 = LDBL_MAX; + long double ld5 = LDBL_MAX_10_EXP; + long double ld6 = LDBL_MAX_EXP; + long double ld7 = LDBL_MIN; + long double ld8 = LDBL_MIN_10_EXP; + long double ld9 = LDBL_MIN_EXP; +}