From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18085 invoked by alias); 25 Aug 2014 21:57:16 -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 18073 invoked by uid 89); 25 Aug 2014 21:57:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-vc0-f178.google.com Received: from mail-vc0-f178.google.com (HELO mail-vc0-f178.google.com) (209.85.220.178) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Mon, 25 Aug 2014 21:57:14 +0000 Received: by mail-vc0-f178.google.com with SMTP id la4so15714723vcb.23 for ; Mon, 25 Aug 2014 14:57:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=WHlyNQ7tlDqhVVGeomFk2eBDg/gTGXZhIb9yzBzsuRM=; b=XEAAIKiwvx/HIooafUO7Q20req8Ob/0LEtGJTigOLUmuImeaFRsttoK4wJNAvA7mA3 nnUdiQ9Zf1xZWOvj5fILK1kFN1d8Mkcb60jXsltv9lPqk/gqmRqbamWjfnyL7To1azJJ DRma+v3JPhgnlSRwzevbIpVNkV4kJXYXLwE44ysVX8NbeVri47m8NYyYwo1C53nIbweZ KCjg4GYeucrq2qY5wlqqrV/7IP1jwRpp5h7j8agDEIrDFTwbK6MXrSXGqKInQvQgL1PO AUYi+e6bJqpCc8xG1E2Rve0iBIVqZPkhOVbaVrSejJVC8OIPpZcyzO4iwsje4PsYOXuB naIg== X-Gm-Message-State: ALoCoQnEGxvHA00jlzylvZTMMtqLjhMnLZSLYI7MOh3JGnM9ap59RDXZMTQgbs6nzKR1iyNia5+H MIME-Version: 1.0 X-Received: by 10.52.119.229 with SMTP id kx5mr7137391vdb.40.1409003832240; Mon, 25 Aug 2014 14:57:12 -0700 (PDT) Received: by 10.52.136.203 with HTTP; Mon, 25 Aug 2014 14:57:12 -0700 (PDT) In-Reply-To: References: Date: Mon, 25 Aug 2014 21:57:00 -0000 Message-ID: Subject: Re: [COMMITTED PATCH] Fix clang compilation errors in gdb.mi/basics.c From: Doug Evans To: Andrew Pinski Cc: "gdb-patches@sourceware.org" Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-08/txt/msg00525.txt.bz2 On Mon, Aug 25, 2014 at 2:39 PM, Andrew Pinski wrote: > On Mon, Aug 25, 2014 at 12:44 PM, Doug Evans wrote: >> Hi. >> >> This patch gets a few more tests working with clang. > > > Seems like maybe we should be compiling with -w for clang instead of > trying to change the testcase itself. Because now we don't know if > the change to the testcase changed the behavior it was testing or not. > > Thanks, > Andrew I thought of that. In this case it would be really unfortunate if a test was relying on things that this particular patch changes. In other situations I'm sure I would agree with you. I didn't do an exhaustive search for what might change, granted, but OTOH the search was non-minimal. > >> >> gdb compile failed, ../../../binutils-gdb/gdb/testsuite/gdb.mi/basics.c:32:1: warning: type >> specifier missing, defaults to 'int' [-Wimplicit-int] >> callee3 (char *strarg) >> ^ >> ../../../binutils-gdb/gdb/testsuite/gdb.mi/basics.c:35:1: warning: control >> reaches end of non-void function [-Wreturn-type] >> } >> ^ >> ... >> >> 2014-08-25 Doug Evans >> >> * gdb.mi/basics.c (callee3, callee2, callee1): Specify result type. >> (main): Ditto. >> >> diff --git a/gdb/testsuite/gdb.mi/basics.c b/gdb/testsuite/gdb.mi/basics.c >> index 0a4f9de..0eabcd1 100644 >> --- a/gdb/testsuite/gdb.mi/basics.c >> +++ b/gdb/testsuite/gdb.mi/basics.c >> @@ -29,17 +29,17 @@ int callee4 (void) >> C = A + B; >> return 0; >> } >> -callee3 (char *strarg) >> +void callee3 (char *strarg) >> { >> callee4 (); >> } >> >> -callee2 (int intarg, char *strarg) >> +void callee2 (int intarg, char *strarg) >> { >> callee3 (strarg); >> } >> >> -callee1 (int intarg, char *strarg, double fltarg) >> +void callee1 (int intarg, char *strarg, double fltarg) >> { >> callee2 (intarg, strarg); >> } >> @@ -57,7 +57,7 @@ void do_nothing (void) >> { >> } >> >> -main () >> +int main () >> { >> callee1 (2, "A string argument.", 3.5); >> callee1 (2, "A string argument.", 3.5);