From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20481 invoked by alias); 1 Nov 2002 20:36:02 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 20443 invoked by uid 71); 1 Nov 2002 20:36:01 -0000 Date: Fri, 01 Nov 2002 12:36:00 -0000 Message-ID: <20021101203601.20440.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Wolfgang Bangerth Subject: Re: c++/4926: Segmentation Fault on Legal Code Reply-To: Wolfgang Bangerth X-SW-Source: 2002-11/txt/msg00042.txt.bz2 List-Id: The following reply was made to PR c++/4926; it has been noted by GNATS. From: Wolfgang Bangerth To: gcc-bugs@gcc.gnu.org, Cc: Subject: Re: c++/4926: Segmentation Fault on Legal Code Date: Fri, 1 Nov 2002 14:31:33 -0600 (CST) It's too bad that templates with typeof are still broken in some places, since the (standards conforming) workarounds are also not working always. Here's a redux of PR 4926: -------------------------------------- template struct X { typedef int Type; }; template struct Y { char array[1]; }; template Y P(T); // acts as "Y" struct F { int operator()() const; }; template typename X::Type foo(); int main() { foo(); }; -------------------------------------- By changing F::operator() into a "regular" member function, all sorts of other bugs can be triggered before the compiler finally crashed :-( Regards Wolfgang ------------------------------------------------------------------------- Wolfgang Bangerth email: bangerth@ticam.utexas.edu www: http://www.ticam.utexas.edu/~bangerth