public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/25278]  New: g++ seems to ignore an overloaded function.
@ 2005-12-06 17:37 theodore dot papadopoulo at sophia dot inria dot fr
  2005-12-06 17:39 ` [Bug c++/25278] " theodore dot papadopoulo at sophia dot inria dot fr
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: theodore dot papadopoulo at sophia dot inria dot fr @ 2005-12-06 17:37 UTC (permalink / raw)
  To: gcc-bugs

The code attached does not compile since version 4.0 of gcc.
Remove either the Cpu namespace or one element in the enumeration or replace
the array size in RGBPixel by a constant and the bug disappears.

It looks as if g++ ignores the overload for ChangeEndianness(RGB<T>&) when it
calls it from ChangeEndianness(T* begin,const T* end) so that the generic
version ChangeEndianness(T& t) is called instead generating and error because
the default class for SwapEndianness does not contain any swap method.

This has been tested with gcc version 4.2.0 20051206 (experimental).

Note also that things slightly improved since
gcc version 4.2.0 20051124 (experimental)
which failed also if the enumeration only had two elements (instead of three
now).

All this is a regression since gcc-3.4.


-- 
           Summary: g++ seems to ignore an overloaded function.
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: theodore dot papadopoulo at sophia dot inria dot fr
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25278


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-12-06 19:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-06 17:37 [Bug c++/25278] New: g++ seems to ignore an overloaded function theodore dot papadopoulo at sophia dot inria dot fr
2005-12-06 17:39 ` [Bug c++/25278] " theodore dot papadopoulo at sophia dot inria dot fr
2005-12-06 17:48 ` pinskia at gcc dot gnu dot org
2005-12-06 18:46 ` theodore dot papadopoulo at sophia dot inria dot fr
2005-12-06 18:51 ` theodore dot papadopoulo at sophia dot inria dot fr
2005-12-06 19:27 ` pinskia at gcc dot gnu 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).