public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/33067] New: Awkward long decimal expansion for double literal in error. @ 2007-08-14 16:50 gcc-bugzilla at contacts dot eelis dot net 2007-08-14 17:03 ` [Bug c++/33067] " pinskia at gcc dot gnu dot org ` (2 more replies) 0 siblings, 3 replies; 4+ messages in thread From: gcc-bugzilla at contacts dot eelis dot net @ 2007-08-14 16:50 UTC (permalink / raw) To: gcc-bugs 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/33067] Awkward long decimal expansion for double literal in error. 2007-08-14 16:50 [Bug c++/33067] New: Awkward long decimal expansion for double literal in error gcc-bugzilla at contacts dot eelis dot net @ 2007-08-14 17:03 ` pinskia at gcc dot gnu dot org 2007-08-14 17:19 ` gcc-bugzilla at contacts dot eelis dot net 2007-09-08 23:28 ` bangerth at dealii dot org 2 siblings, 0 replies; 4+ messages in thread From: pinskia at gcc dot gnu dot org @ 2007-08-14 17:03 UTC (permalink / raw) To: gcc-bugs ------- Comment #1 from pinskia at gcc dot gnu dot org 2007-08-14 17:02 ------- Well 1.1 is not directly represented in double precission which is why you get that "weird" number. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33067 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/33067] Awkward long decimal expansion for double literal in error. 2007-08-14 16:50 [Bug c++/33067] New: Awkward long decimal expansion for double literal in error gcc-bugzilla at contacts dot eelis dot net 2007-08-14 17:03 ` [Bug c++/33067] " pinskia at gcc dot gnu dot org @ 2007-08-14 17:19 ` gcc-bugzilla at contacts dot eelis dot net 2007-09-08 23:28 ` bangerth at dealii dot org 2 siblings, 0 replies; 4+ messages in thread From: gcc-bugzilla at contacts dot eelis dot net @ 2007-08-14 17:19 UTC (permalink / raw) To: gcc-bugs ------- Comment #2 from gcc-bugzilla at contacts dot eelis dot net 2007-08-14 17:19 ------- I know that, but that's irrelevant from a user interface perspective. The fact remains that the error message is needlessly messy and would be far clearer and less surprising to the user if it said 1.1 instead of 1.100000000000000088817841970012523233890533447265625e+0. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33067 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/33067] Awkward long decimal expansion for double literal in error. 2007-08-14 16:50 [Bug c++/33067] New: Awkward long decimal expansion for double literal in error gcc-bugzilla at contacts dot eelis dot net 2007-08-14 17:03 ` [Bug c++/33067] " pinskia at gcc dot gnu dot org 2007-08-14 17:19 ` gcc-bugzilla at contacts dot eelis dot net @ 2007-09-08 23:28 ` bangerth at dealii dot org 2 siblings, 0 replies; 4+ messages in thread From: bangerth at dealii dot org @ 2007-09-08 23:28 UTC (permalink / raw) To: gcc-bugs ------- Comment #3 from bangerth at dealii dot org 2007-09-08 23:27 ------- Confirmed. In particular, the value 1.1 is of type 'double' for which it hardly ever makes sense to print it to 47 digits :-) W. -- bangerth at dealii dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Keywords| |diagnostic Last reconfirmed|0000-00-00 00:00:00 |2007-09-08 23:27:54 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33067 ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-09-08 23:28 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2007-08-14 16:50 [Bug c++/33067] New: Awkward long decimal expansion for double literal in error gcc-bugzilla at contacts dot eelis dot net 2007-08-14 17:03 ` [Bug c++/33067] " pinskia at gcc dot gnu dot org 2007-08-14 17:19 ` gcc-bugzilla at contacts dot eelis dot net 2007-09-08 23:28 ` bangerth at dealii dot org
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).