From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22302 invoked by alias); 30 Dec 2008 17:29:45 -0000 Received: (qmail 19689 invoked by uid 48); 30 Dec 2008 17:25:42 -0000 Date: Tue, 30 Dec 2008 17:29:00 -0000 Message-ID: <20081230172542.19688.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/34624] templated code is rejected different type in nontype template argument In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "pinskia at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-12/txt/msg02959.txt.bz2 ------- Comment #10 from pinskia at gcc dot gnu dot org 2008-12-30 17:25 ------- Here is a reduced testcase which is rejected for both -m32 and -m64: typedef unsigned long size_t; template class array {}; typedef unsigned int uint; template struct my_table: array {}; template inline const sampletype * get_samples(array const &buffer) { } int main() { my_table tab; const float * ptr = get_samples(tab); } -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|valid c++ code doesn't |templated code is rejected |compile for x86_64, but for |different type in nontype |i386 |template argument http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34624