public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: gcc@gcc.gnu.org
Subject: C89 question: Do we need to accept -Wint-conversion warnings
Date: Tue, 10 Oct 2023 13:29:48 +0200	[thread overview]
Message-ID: <87h6myaf6b.fsf@oldenburg.str.redhat.com> (raw)

Are these code fragments valid C89 code?

  int i1 = 1;
  char *p1 = i;

  char c;
  char *p2 = &c;
  int i2 = p2;

Or can we generate errors for them even with -std=gnu89?

(It will still be possible to override this with -fpermissive or
-Wno-int-conversion.)

Thanks,
Florian


             reply	other threads:[~2023-10-10 11:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-10 11:29 Florian Weimer [this message]
2023-10-10 16:30 ` Jason Merrill
2023-10-10 16:38   ` Jakub Jelinek
2023-10-10 17:06     ` Florian Weimer
2023-10-10 17:38       ` Joel Sherrill
2023-10-11  7:36   ` David Brown
2023-10-11  8:10     ` Florian Weimer
2023-10-11  8:51       ` David Brown
2023-10-11 10:17         ` Florian Weimer
2023-10-11 11:28           ` David Brown
2023-10-11 11:38             ` Florian Weimer
2023-10-10 16:38 ` Joseph Myers
2023-10-10 17:07   ` Florian Weimer

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=87h6myaf6b.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=gcc@gcc.gnu.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).