From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11674 invoked by alias); 27 Mar 2015 09:47:03 -0000 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 Received: (qmail 11656 invoked by uid 89); 27 Mar 2015 09:47:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.4 required=5.0 tests=AWL,BAYES_00,FAKE_REPLY_C,LIKELY_SPAM_BODY,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: outpost17.zedat.fu-berlin.de Received: from outpost17.zedat.fu-berlin.de (HELO outpost17.zedat.fu-berlin.de) (130.133.4.110) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 27 Mar 2015 09:47:00 +0000 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by outpost.zedat.fu-berlin.de (Exim 4.85) with esmtp (envelope-from ) id <1YbQqv-001ZmH-IA>; Fri, 27 Mar 2015 10:46:57 +0100 Received: from mx.physik.fu-berlin.de ([160.45.64.218]) by relay1.zedat.fu-berlin.de (Exim 4.85) with esmtps (envelope-from ) id <1YbQqv-0027pZ-Gh>; Fri, 27 Mar 2015 10:46:57 +0100 Received: from login1.physik.fu-berlin.de ([160.45.66.207]) by mx.physik.fu-berlin.de with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1YbQqr-0007yR-OZ; Fri, 27 Mar 2015 10:46:53 +0100 Received: from tburnus by login1.physik.fu-berlin.de with local (Exim 4.80 #3 (Debian)) id 1YbQqr-0000ij-Ha; Fri, 27 Mar 2015 10:46:53 +0100 Date: Fri, 27 Mar 2015 09:47:00 -0000 From: Tobias Burnus To: Joel Brobecker , gdb-patches@sourceware.org Subject: Re: gdb fails to compile with GCC 4.4.7 (was: [PATCH V4 5/9] New probe type: DTrace USDT probes.) Message-ID: <20150327094653.GA29713@physik.fu-berlin.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20150326210014.GC13867@adacore.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2015-03/txt/msg00887.txt.bz2 Hi all, I think this patch (commit 429e1e811b400f07b5a514ea6b8a70b28e2d7ee9) causes gdb's compilation to fail with GCC 4.4.7 (RHEL 6 system compiler) as follows; it does work with GCC 5. cc1: warnings being treated as errors ../../gdb/dtrace-probe.c: In function ‘dtrace_process_dof_probe’: ../../gdb/dtrace-probe.c:416: error: ‘expr’ may be used uninitialized in this function make[2]: *** [dtrace-probe.o] Error 1 I think that looks spurious as the code looks fine (i.e. GCC is overzaelous), still, a "= NULL" should harm. Tobias 414 { 415 struct dtrace_probe_arg arg; 416 struct expression *expr; ... 431 TRY 432 { 433 expr = parse_expression_with_language (arg.type_str, language_c); 434 } 435 CATCH (ex, RETURN_MASK_ERROR) 436 { 437 expr = NULL; 438 } 439 END_CATCH 440 441 if (expr != NULL && expr->elts[0].opcode == OP_TYPE) 442 arg.type = expr->elts[1].type;