public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Joseph Myers <joseph@codesourcery.com>
To: Jan Hubicka <hubicka@ucw.cz>
Cc: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>,
	<gcc-patches@gcc.gnu.org>, <rguenther@suse.de>
Subject: Re: Teach gimple_canonical_types_compatible_p about incomplete types
Date: Fri, 29 May 2015 21:37:00 -0000	[thread overview]
Message-ID: <alpine.DEB.2.10.1505292052250.17156@digraph.polyomino.org.uk> (raw)
In-Reply-To: <20150526001604.GA43680@kam.mff.cuni.cz>

On Tue, 26 May 2015, Jan Hubicka wrote:

> > On May 25, 2015 1:49:45 AM GMT+02:00, Jan Hubicka <hubicka@ucw.cz> wrote:
> > 
> > 
> > >2  Each enumerated type shall be compatible with char ,  a  signed
> > >integer
> > >     type, or an unsigned integer type. The choice of type is
> > >implementation-defined, but  shall be capable of representing the
> > >values
> > >     of all the members of the enumeration.    The enumerated type is
> > >     incomplete until immediately after the that terminates the list of
> > >     enumerator declarations, and complete thereafter.
> > >
> > >(we ignore this completely as far as I know, it is easy to fix though,
> > >all
> > > we need is to make ENUMERATION_TYPE pretend to be INTEGER_TYPE)
> > 
> > Don't forget -fshort-enum though.
> 
> I believe -fshort-enum is makes us non-complian to the C standard and thus
> we are free to not follow this rule :)

-fshort-enums is perfectly compatible with the C standard.  The choice of 
integer type depends on the enumerated type in question - different 
enumerated types can be compatible with different integer types.

-- 
Joseph S. Myers
joseph@codesourcery.com

  reply	other threads:[~2015-05-29 20:53 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-25  1:32 Jan Hubicka
2015-05-25 17:33 ` Bernhard Reutner-Fischer
2015-05-26  1:18   ` Jan Hubicka
2015-05-29 21:37     ` Joseph Myers [this message]
2015-05-29 21:46       ` Jan Hubicka
2015-05-30  3:28         ` Jan Hubicka
2015-05-30 15:38           ` Bernhard Reutner-Fischer
2015-05-30 21:14             ` Jan Hubicka
2015-06-01 19:47           ` Joseph Myers
2015-06-02 17:34             ` Jan Hubicka
2015-06-02 17:43               ` Joseph Myers
2015-06-02 17:55                 ` Jan Hubicka
2015-06-03 11:41           ` Richard Biener
2015-06-03 22:12             ` Jan Hubicka
2015-05-26  8:45 ` Richard Biener
2015-05-26 17:36   ` Jan Hubicka
2015-05-27  8:38     ` Richard Biener
2015-05-27 22:53       ` Jan Hubicka

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=alpine.DEB.2.10.1505292052250.17156@digraph.polyomino.org.uk \
    --to=joseph@codesourcery.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hubicka@ucw.cz \
    --cc=rep.dot.nop@gmail.com \
    --cc=rguenther@suse.de \
    /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).