From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28369 invoked by alias); 6 Dec 2005 18:46:13 -0000 Received: (qmail 28358 invoked by uid 48); 6 Dec 2005 18:46:11 -0000 Date: Tue, 06 Dec 2005 18:46:00 -0000 Message-ID: <20051206184611.28357.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/25278] g++ seems to ignore an overloaded function. In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "theodore dot papadopoulo at sophia dot inria dot fr" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2005-12/txt/msg00587.txt.bz2 List-Id: ------- Comment #3 from theodore dot papadopoulo at sophia dot inria dot fr 2005-12-06 18:46 ------- (In reply to comment #0) > 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&) 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. > -- theodore dot papadopoulo at sophia dot inria dot fr changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |UNCONFIRMED Resolution|INVALID | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25278