Message ID | yjt2sikkqrqf.fsf@ruffy.mtv.corp.google.com |
---|---|
State | Committed |
Headers |
Received: (qmail 4884 invoked by alias); 25 Aug 2014 19:44:29 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <gdb-patches.sourceware.org> List-Unsubscribe: <mailto:gdb-patches-unsubscribe-##L=##H@sourceware.org> List-Subscribe: <mailto:gdb-patches-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 4874 invoked by uid 89); 25 Aug 2014 19:44:28 -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-ig0-f201.google.com Received: from mail-ig0-f201.google.com (HELO mail-ig0-f201.google.com) (209.85.213.201) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Mon, 25 Aug 2014 19:44:27 +0000 Received: by mail-ig0-f201.google.com with SMTP id h3so502325igd.2 for <gdb-patches@sourceware.org>; Mon, 25 Aug 2014 12:44:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-type; bh=v3ZsBm/R9MpRNI5Cqr7re0eQzVf+hXhNuI82Sabp/Ic=; b=ZynXr24wm3NlzG3rwZluG5Vm3hWh309wjmPtdbCCM7PFdRXJu+bqEqqPOjxU4zcEie Gqa1hgmdHQMXzEVxA0sIyZxp4yW8Izs4g4FDv9/mlT/z+MkIk38hEZWeAiztNWJNOZfN X+osu7gpuEdU+inwoW8xaA1Nj8xoUHCHU0ZVAn/ThXAFJx5ACyTSm1NrD4rAlYToRFfr ei9rxU5Je+PCSoZ/O7U4vgshIGtkM/shmdZIQ/DlpsHlo58WPjqq/DFt2wtvvXG9UGuq Qt4xA6XSHA37IGKnDbmQ+vW6zB/5/EKNBNfWDTNmFxTgzNzI6rmW5W9cXYszzWQOK4Ee gzUg== X-Gm-Message-State: ALoCoQkEdmU85l/8Fqzmjf7UDTOzsWdkL3KWB4iPUieY4P1RDIfuQpohYpULuVEQP1JOgiuZW/IFDE9HJjY7KioE+x3wDcQShLInE5pQ1grtBimgHoC5LnOeklQ50a81AbtlZo8K7NjK X-Received: by 10.50.117.10 with SMTP id ka10mr11409905igb.1.1408995865490; Mon, 25 Aug 2014 12:44:25 -0700 (PDT) Received: from corp2gmr1-1.hot.corp.google.com (corp2gmr1-1.hot.corp.google.com [172.24.189.92]) by gmr-mx.google.com with ESMTPS id m14si52274yhm.7.2014.08.25.12.44.25 for <gdb-patches@sourceware.org> (version=TLSv1.1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 25 Aug 2014 12:44:25 -0700 (PDT) Received: from ruffy.mtv.corp.google.com (ruffy.mtv.corp.google.com [172.17.128.44]) by corp2gmr1-1.hot.corp.google.com (Postfix) with ESMTPS id 352A531C4A6 for <gdb-patches@sourceware.org>; Mon, 25 Aug 2014 12:44:25 -0700 (PDT) From: Doug Evans <dje@google.com> To: gdb-patches@sourceware.org Subject: [COMMITTED PATCH] Fix clang compilation errors in gdb.mi/basics.c Date: Mon, 25 Aug 2014 12:44:24 -0700 Message-ID: <yjt2sikkqrqf.fsf@ruffy.mtv.corp.google.com> MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes |
Commit Message
Doug Evans
Aug. 25, 2014, 7:44 p.m. UTC
Hi. This patch gets a few more tests working with clang. 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 <dje@google.com> * gdb.mi/basics.c (callee3, callee2, callee1): Specify result type. (main): Ditto.
Comments
On Mon, Aug 25, 2014 at 12:44 PM, Doug Evans <dje@google.com> 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 > > 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 <dje@google.com> > > * 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);
On Mon, Aug 25, 2014 at 2:39 PM, Andrew Pinski <pinskia@gmail.com> wrote: > On Mon, Aug 25, 2014 at 12:44 PM, Doug Evans <dje@google.com> 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 <dje@google.com> >> >> * 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);
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);