This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: g++ and _DecimalXX types
- From: Paolo Carlini <paolo dot carlini at oracle dot com>
- To: Roman Kononov <roman at binarylife dot net>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 11 Jan 2010 18:39:15 +0100
- Subject: Re: g++ and _DecimalXX types
- References: <hifjb8$1fg$1@ger.gmane.org>
On 01/11/2010 05:24 PM, Roman Kononov wrote:
> #g++ --version | head -1
> g++ (GCC) 4.4.3 20091228 (prerelease)
> #cat test.cc
> typedef _Decimal32 my_type;
> #gcc -c test.cc
> #g++ -c test.cc
> test.cc:1: error: '_Decimal32' does not name a type
>
> G++ is unfamiliar with the _DecimalXX types. Is it a "feature", bug or
> lack of development?
I don't think somebody in the GCC project maintains that this works in
4.4.3. In mainline (would be 4.5.0) the following works perfectly well,
however, and we have a full testsuite contributed by Janis, along these
lines:
#include <decimal/decimal>
typedef std::decimal::decimal32 my_type;
> #cat test.cc
> typedef __decltype(0.0DF) my_type;
> my_type foo(my_type v) { return v; }
> #g++ -c test.cc
> test.cc:2: internal compiler error: in write_builtin_type, at
> cp/mangle.c:1855
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <http://gcc.gnu.org/bugs.html> for instructions.
This works fine in mainline.
Paolo.