From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6084 invoked by alias); 7 Feb 2006 02:36:20 -0000 Received: (qmail 6047 invoked by uid 48); 7 Feb 2006 02:36:18 -0000 Date: Tue, 07 Feb 2006 02:36:00 -0000 Message-ID: <20060207023618.6046.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/26143] accepts invalid function pointer type return 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-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-02/txt/msg00605.txt.bz2 List-Id: ------- Comment #2 from pinskia at gcc dot gnu dot org 2006-02-07 02:36 ------- Actually I looked at this again and this is invalid code and we should reject it (fixing where the const is fixes the wrong code): struct DebugStringHolder { int (*get()) () const; }; ------ Related to PR 6628 -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- BugsThisDependsOn| |6628 Keywords|wrong-code |accepts-invalid Known to fail|4.0.3 |4.0.3 2.95.3 3.0.4 4.1.0 | |4.2.0 Known to work|3.4.5 4.1.0 | Summary|[4.0 Regression] wrong code |accepts invalid function |when returning a function |pointer type return |pointer | Target Milestone|4.0.3 |--- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26143