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

Reply via email to