Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Stan Shebs <stanshebs@earthlink.net>
To: gdb-patches@sourceware.org
Subject: Re: GCC switch to C11 causes many testsuite compiler diagnostics
Date: Thu, 30 Oct 2014 22:26:00 -0000	[thread overview]
Message-ID: <5452BB29.8090803@earthlink.net> (raw)
In-Reply-To: <874mula6db.fsf@br87z6lw.de.ibm.com>

On 10/30/14, 9:07 AM, Andreas Arnez wrote:
> On Sat, Oct 25 2014, Sandra Loosemore wrote:
> 
>> Comparing my latest nios2 test results (with Pedro's thread patch)
>> with those from a checkout a couple weeks old, I noticed I had some
>> new ERRORs due to apparent compilation failures.  I tracked this down
>> to the recent change on GCC mainline (r216247) to make the default C
>> dialect GNU11, which enables -Wimplicit-int and
>> -Wimplicit-function-declaration by default.  I started working on a
>> patch to fix the offending testcases, but realized that there are
>> hundreds of them.  :-(
> 
> The warnings appear in our S390 testing as well, so I've been working on
> a fix already, as announced here:
> 
>   https://sourceware.org/ml/gdb-testers/2014-q4/msg00037.html
> 
> In the meantime I've completed a patch set; maybe you'd like to check
> that it does fix the warnings on NIOS2:
> 
>   https://sourceware.org/ml/gdb-patches/2014-10/msg00802.html
> 
>>
>> So, before I invest a lot more time on this, is updating the GDB
>> testsuite to use a more modern C dialect the Right Thing To Do?  I'm
>> also wondering if it's really necessary to support compilers that
>> can't handle function prototypes in the testsuite (not defining
>> PROTOTYPES seems to be the default, in fact).
> 
> AFAIK there's no need to support pre-C89 compilers that can't handle
> function prototypes.  GDB itself can't be compiled with such a compiler,
> and many GDB test cases wouldn't work either.
> 
> --
> Andreas

I looked at your patch, but haven't replied because I'm still waffling
about it.

In theory, GDB could be handed an executable that was built in 1988 and
most debugging actions would work.  In practice, the old executable is
unlikely to run on any modern hardware, and we've already decided not to
expend much effort to support old hardware.

Where things are a little murkier is K&R-style source code.  There was a
lot out there at one time, but most (all?) maintained sources have been
converted sometime in the intervening quarter-century.

Perhaps the thing to do is pose this as a trivia quiz - what K&R sources
are still being built and debugged on today's systems?

Stan
stan@codesourcery.com



  reply	other threads:[~2014-10-30 22:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-25 17:04 Sandra Loosemore
2014-10-25 17:28 ` Mark Kettenis
2014-10-30 16:23   ` Andreas Arnez
2014-10-31 19:02     ` Doug Evans
2014-10-31 19:23       ` Mark Kettenis
2014-10-31 19:29         ` Doug Evans
2014-11-03 11:02         ` Andreas Arnez
2014-10-30 16:07 ` Andreas Arnez
2014-10-30 22:26   ` Stan Shebs [this message]
2014-10-30 22:37     ` Sergio Durigan Junior
2014-11-23  7:27 ` Joel Brobecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5452BB29.8090803@earthlink.net \
    --to=stanshebs@earthlink.net \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox