public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "gjl at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug other/57482] [4.7.3][AVR] --help=optimizers reports a wrong list
Date: Tue, 04 Jun 2013 13:38:00 -0000	[thread overview]
Message-ID: <bug-57482-4-itUxdI3u5d@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-57482-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57482

Georg-Johann Lay <gjl at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|AVR ATmega128               |avr
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-06-04
                 CC|                            |gjl at gcc dot gnu.org
          Component|c                           |other
     Ever confirmed|0                           |1
              Build|4.7.3                       |

--- Comment #2 from Georg-Johann Lay <gjl at gcc dot gnu.org> ---
I can confirm this with 4.7.2 and the following source file

== foo.c ==

typedef enum { A, B } ab_t;

int a[sizeof (ab_t) == 2 ? 1 : -1];

== compile ==

$ avr-gcc foo.c

$ avr-gcc foo.c -Q --help=optimizers | grep short.enum
  -fshort-enums                   [enabled]

== issues ==

1) foo.c compiles fine, thus enums are 2 byte per default.
   This shows the output of --help=optimizers is not correct.

2) -f[no-]short-enums is not an optimization option;
   it's an option affecting the ABI.  Better / worse code
   is just a side effect of respective ABI change.

3) The backend does not implement TARGET_DEFAULT_SHORT_ENUMS
   thus the default shall be like with  -fno-short-enums, cf.
   target.def defines the hook default to hook_bool_void_false.


  reply	other threads:[~2013-06-04 13:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-31  9:28 [Bug c/57482] New: " christophe.beausoleil at sogeti dot com
2013-06-04 13:38 ` gjl at gcc dot gnu.org [this message]
2013-06-10  8:04 ` [Bug other/57482] [4.7.3][AVR] " christophe.beausoleil at sogeti dot com

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=bug-57482-4-itUxdI3u5d@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).