public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: dewar@gnat.com (Robert Dewar)
To: gdr@codesourcery.com, jbuck@synopsys.com
Cc: aoliva@redhat.com, dewar@gnat.com, gcc@gcc.gnu.org, phil@jaj.com
Subject: Re: a warning to implement
Date: Wed, 06 Feb 2002 12:04:00 -0000	[thread overview]
Message-ID: <20020206195658.7635EF28CF@nile.gnat.com> (raw)

But Gaby, right now, the construct

 int a = a;

produces an undefined result, so no one can use it. It might suppress
warnings in one version of gcc, but then someone might submit a patch
that causes it to have some disastrous effect, and no one would have
a right to complain, since if they are using this, they are using an
undocumented behavior, and have no right to count on it.

So the idea of excluding this from -Wall would make sense ONLY if you
make the effect of suppressing warnings an official part of the gcc
semantics. In short only the following make sense:

1. Make this an official construct for the purpose of suppressing warnings
for uninitialized variables, and document that it has no other (ill) effect.
You can then decide whether to put the warning for this non-standard
construct in -Wall or not.

2. Leave this as it is now, undefined, in which case there can be no objection
to it being in -Wall, and indeed those people injudiciously using this
consruct to suppress warnings will be warned that this usage is neither
blessed nor guaranteed.

Frankly I would be surprised if you could get a consensus for approach 1.

             reply	other threads:[~2002-02-06 19:57 UTC|newest]

Thread overview: 105+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-06 12:04 Robert Dewar [this message]
2002-02-06 12:22 ` Joe Buck
2002-02-06 12:32   ` Gabriel Dos Reis
2002-02-06 12:51     ` Jason Riedy
  -- strict thread matches above, loose matches on Subject: below --
2002-02-11  7:30 Robert Dewar
2002-02-11  7:13 Robert Dewar
2002-02-11  6:53 Bernard Dautrevaux
2002-02-11  7:19 ` Alexandre Oliva
2002-02-11  7:44   ` Paolo Carlini
2002-02-11  9:25     ` Alexandre Oliva
2002-02-11 10:07       ` Joe Buck
2002-02-11 10:19         ` Alexandre Oliva
2002-02-08  9:46 Bernard Dautrevaux
2002-02-08 13:33 ` Gabriel Dos Reis
2002-02-10  7:50   ` Per Abrahamsen
2002-02-08  8:23 Robert Dewar
2002-02-08  9:09 ` Gabriel Dos Reis
2002-02-08  6:57 Bernard Dautrevaux
2002-02-08  8:21 ` Gabriel Dos Reis
2002-02-06 13:55 mike stump
2002-02-06 13:02 Robert Dewar
2002-02-07 10:51 ` Gabriel Dos Reis
2002-02-06 12:29 Robert Dewar
2002-02-06 12:35 ` Gabriel Dos Reis
2002-02-06  9:03 Robert Dewar
2002-02-06  9:19 ` Gabriel Dos Reis
2002-02-06  8:40 Robert Dewar
2002-02-06  8:29 Robert Dewar
2002-02-06  8:29 ` Gabriel Dos Reis
2002-02-06  8:38 ` Nathan Sidwell
2002-02-06  8:50   ` Gabriel Dos Reis
2002-02-06  8:03 Robert Dewar
2002-02-06  7:51 Robert Dewar
2002-02-06  6:56 Robert Dewar
2002-02-06  8:01 ` Gabriel Dos Reis
2002-02-06  6:35 Robert Dewar
2002-02-06  2:00 Jeremy Sanders
2002-02-06  0:03 Robert Dewar
2002-02-06 10:50 ` Joe Buck
2002-02-06 11:44   ` Gabriel Dos Reis
2002-02-06 11:47     ` Joe Buck
2002-02-05 20:27 Robert Dewar
2002-02-05 20:16 Robert Dewar
2002-02-05 21:00 ` Alexandre Oliva
2002-02-06 10:51   ` Joe Buck
2002-02-06 14:04     ` Alexandre Oliva
2002-02-06 14:57       ` Joe Buck
2002-02-05 20:12 Robert Dewar
2002-02-05 20:07 Robert Dewar
2002-02-06 11:06 ` Joe Buck
2002-02-05 19:26 Robert Dewar
2002-02-05 19:24 Robert Dewar
2002-02-05 17:04 Richard Almquist
2002-02-05 15:55 Robert Dewar
2002-02-05 16:58 ` Gabriel Dos Reis
2002-02-05 14:23 Robert Dewar
2002-02-05 15:00 ` Gabriel Dos Reis
2002-02-05 14:14 Robert Dewar
2002-02-05 14:47 ` Michael Matz
2002-02-05 15:40 ` Gabriel Dos Reis
2002-02-06  4:24   ` Richard Sandiford
2002-02-06  4:51     ` Gabriel Dos Reis
2002-02-06  5:55       ` Richard Sandiford
2002-02-06  6:17         ` Gabriel Dos Reis
2002-02-06  7:56         ` Kevin Handy
2002-02-06  2:08 ` Akim Demaille
2002-02-06  7:37   ` Akim Demaille
2002-02-05 14:12 Robert Dewar
2002-02-05  9:31 Bernard Dautrevaux
2002-02-05  9:44 ` Gabriel Dos Reis
2002-02-05 10:09   ` Tim Hollebeek
2002-02-05 10:42     ` Gabriel Dos Reis
2002-02-05 11:52       ` Tim Hollebeek
2002-02-05 14:48         ` Gabriel Dos Reis
2002-02-05 13:52       ` Joe Buck
2002-02-05 14:10         ` Tim Hollebeek
2002-02-05 14:29         ` Stephano Mariani
2002-02-05 14:38           ` Tim Hollebeek
2002-02-05 14:53             ` Stephano Mariani
2002-02-05 18:46               ` Joe Buck
2002-02-05 14:48         ` Gabriel Dos Reis
2002-02-05 15:03           ` Phil Edwards
2002-02-05 15:43             ` Gabriel Dos Reis
2002-02-06  9:14             ` Gerald Pfeifer
2002-02-06  9:20               ` Gabriel Dos Reis
2002-02-06  9:23               ` Phil Edwards
2002-02-06  2:12       ` Daniel Egger
2002-02-05  5:12 Robert Dewar
2002-02-05  8:21 ` Gabriel Dos Reis
2002-02-05  4:33 Robert Dewar
2002-02-05  8:49 ` Gabriel Dos Reis
2002-02-03 10:52 Robert Dewar
2002-02-03 10:52 Robert Dewar
2002-02-04 21:36 ` Gabriel Dos Reis
2002-02-02 18:02 Robert Dewar
2002-02-02 18:46 ` Alexandre Oliva
2002-02-02 16:09 Robert Dewar
2002-02-02 17:00 ` Alexandre Oliva
2002-02-03 10:52 ` Gabriel Dos Reis
2002-02-02  2:45 Paolo Carlini
2002-02-02 16:05 ` Alexandre Oliva
2002-02-03 10:52 ` Andrey R. Urazov
2002-02-03 10:52   ` Paolo Carlini
2002-02-03 10:52     ` Andrey R. Urazov
2002-02-02  1:26 Andrey R. Urazov

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=20020206195658.7635EF28CF@nile.gnat.com \
    --to=dewar@gnat.com \
    --cc=aoliva@redhat.com \
    --cc=gcc@gcc.gnu.org \
    --cc=gdr@codesourcery.com \
    --cc=jbuck@synopsys.com \
    --cc=phil@jaj.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).