public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Giovanni Bajo" <giovannibajo@libero.it>
To: "Richter, Jörg" <Joerg.Richter@pdv-FS.de>
Cc: <gcc@gcc.gnu.org>
Subject: Re: Warn implicit enum conversions
Date: Mon, 22 Nov 2004 18:52:00 -0000	[thread overview]
Message-ID: <1d6601c4d0a7$510abab0$2fb82997@bagio> (raw)
In-Reply-To: <BE04DD7F49713C4C94B1A89A81CEFE1C0556D7@exch03.pdv-fs.de>

Richter, Jörg <Joerg.Richter@pdv-FS.de> wrote:

> I can't imagine, that this demand is so uncommon. Perhaps someone
> knows of a patch that does something like this? Or alternatively you
> can point me to some functions in gcc where I can start to try to
> implement it myself?
> Ah yes, I need it for C++.

Look into cp/cvt.c, ocp_convert(). It already handles errors for enum to enum
conversion and integer to enum conversion, so you can add your warning there.
Googling a bit should give you at list one link to a patch adding a new warning
message (get something recent!), so that you see all the places you need to
updated.

Remember to work on mainline, not a release branch.

Giovanni Bajo

      parent reply	other threads:[~2004-11-22 15:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-22 15:21 "Richter, Jörg"
2004-11-22 15:39 ` Giovanni Bajo
2004-11-22 18:52 ` Giovanni Bajo [this message]

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='1d6601c4d0a7$510abab0$2fb82997@bagio' \
    --to=giovannibajo@libero.it \
    --cc=Joerg.Richter@pdv-FS.de \
    --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).