This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/33067] New: Awkward long decimal expansion for double literal in error.
- From: "gcc-bugzilla at contacts dot eelis dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Aug 2007 16:50:03 -0000
- Subject: [Bug c++/33067] New: Awkward long decimal expansion for double literal in error.
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Consider:
struct T {} t;
bool b = 1.1 < t;
The code is invalid, but GCC's error message is peculiar:
"error: no match for 'operator<' in
'1.100000000000000088817841970012523233890533447265625e+0 < t'"
The long decimal expansion makes for a messy error that suggests the user typed
something he did not.
It should just say:
"error: no match for 'operator<' in '1.1 < t'"
--
Summary: Awkward long decimal expansion for double literal in
error.
Product: gcc
Version: 4.1.2
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gcc-bugzilla at contacts dot eelis dot net
GCC host triplet: x86_64-suse-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33067