From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3246 invoked by alias); 23 Jul 2011 18:38:32 -0000 Received: (qmail 3238 invoked by uid 22791); 23 Jul 2011 18:38:31 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO glazunov.sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 23 Jul 2011 18:38:17 +0000 Received: from glazunov.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by glazunov.sibelius.xs4all.nl (8.14.3/8.14.3) with ESMTP id p6NIcD2D010573; Sat, 23 Jul 2011 20:38:13 +0200 (CEST) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.3/8.14.3/Submit) id p6NIcBDq020651; Sat, 23 Jul 2011 20:38:11 +0200 (CEST) Date: Sat, 23 Jul 2011 21:17:00 -0000 Message-Id: <201107231838.p6NIcBDq020651@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: jan.kratochvil@redhat.com CC: gdb-patches@sourceware.org In-reply-to: <20110715191920.GA29975@host1.jankratochvil.net> (message from Jan Kratochvil on Fri, 15 Jul 2011 21:19:20 +0200) Subject: Re: [rfc] Be in language c more c++ compatible References: <20110715191920.GA29975@host1.jankratochvil.net> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-07/txt/msg00656.txt.bz2 > Date: Fri, 15 Jul 2011 21:19:20 +0200 > From: Jan Kratochvil > > Hi, > > I always see some terrible C++ GDB bug so I fix in some hours and then find out > it works in GDB when one has `set language c++'. This usually happens with > artificial testcases like the one today: > http://sourceware.org/ml/gdb-patches/2011-07/msg00387.html > > I was told by Keith it also happens to him. > > echo 'class C { typedef int t; t i; } c;'|g++ -c -o 1.o -g -x c++ - Isn't that a GCC bug? I mean, if code is compiled with the C++ compiler it should be tagged as such in the debug info shouldn't it? > The first (c-exp.y) part parses those parts of `language c++' which cannot > (I believe - RFC) lead to misinterpretation of any valid C code even in > `language c'. I think this is a bad idea.