Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Andrey Smirnov <andrew.smirnov@gmail.com>
Cc: gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH 01/17] Enable building with -Wshadow
Date: Tue, 01 Nov 2011 17:43:00 -0000	[thread overview]
Message-ID: <m339e73fix.fsf@fleche.redhat.com> (raw)
In-Reply-To: <CAHQ1cqEoPcwJNsWH69EhbEHhwtzmM7aH3mp0RA6uOxkkADfYMA@mail.gmail.com>	(Andrey Smirnov's message of "Tue, 1 Nov 2011 16:58:15 +0600")

>>>>> "Andrey" == Andrey Smirnov <andrew.smirnov@gmail.com> writes:

Andrey> On the supr of the moment, while reading Project Ideas page on
Andrey> GDB wiki, I've decided to undertake the task of making
Andrey> compilation with -Wshadow flag possible (seeing how that is a
Andrey> simple task for a person unfamiliar with gdb's code base).

Thanks.

Andrey> So, having configured the code with
Andrey> gcc.gnu.org
Andrey> CFLAGS="-D_BSD_SOURCE -D_POSIX_C_SOURCE=199309L -Wshadow -Werror
Andrey> -ansi" ./configure

I would suggest instead adding -Wshadow to build_warnings in
gdb/configure.ac.  I am not sure whether the other subdirectories in src
are interested in -Wshadow.

Andrey> I rummaged through it and fixed all naming clashes.
Andrey> In the attachment to this letter is a 1st in the series of 17 patches.
Andrey> The majority of the changes is related to fixing -Wshadow caused errors
Andrey> with two or three fixes related to -Werror and -ansi flags.

I don't think we want -ansi, though I am not sure.
I think it would be good to separate out these patches so we can see.

Andrey> - What is the common way(etiquette?) of sending a series patches to this
Andrey>   list? Do I send them all at once or do I wait 'till the end of
Andrey>   discussion about the first one?

You can send them all at once.

However -- I think the best overall approach would be to separate
"pretty obvious" patches from ones that are not as obvious.  I know they
are all just renamings, but I think some forms of shadowing (like purely
within a single function) are much easier to review than others.  Also I
expect some may be contentious, perhaps even the whole project will be.

Andrey> - Does the part of MAINTAINERS file about patches to libiberty,
Andrey>   libdecnumber and intl needing to be sent to GCC still holds true or
Andrey>   should I send them to this list?  Bfd and binutils?

Yes, libdecnumber and libiberty are canonically maintained in GCC.
I don't know if they want -Wshadow or not.

BFD patches should go to binutils.  I also don't know if they want -Wshadow.

Andrey> - In case the patches got applied and building with -Wshadow is working
Andrey>   would it be possible to add aforementioned CFLAGS to the set of
Andrey>   default ones?

The configure.ac change will handle this.

Andrey> P.S. Forgot to mention that I checked for regressions by running
Andrey> 'make check' and, to the best of my knowledge, fixed all that
Andrey> have been cased by my patches.

Thanks.

I suspect you are going to need a copyright assignment in place.  I
think it is maybe a grey area, since the patches are generally
mechanical, but it can't hurt.  Contact me off-list and I will get you
started.

I didn't read this patch yet.  If we need paperwork we might as well
wait for it to be finished.

Tom


  reply	other threads:[~2011-11-01 17:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-01 10:58 Andrey Smirnov
2011-11-01 17:43 ` Tom Tromey [this message]
2011-11-02  7:57   ` Andrey Smirnov

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=m339e73fix.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=andrew.smirnov@gmail.com \
    --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