public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Martin Sebor <msebor@gmail.com>
To: gcc-patches@gcc.gnu.org, vogt@linux.vnet.ibm.com
Cc: Andreas Krebbel <krebbel@linux.vnet.ibm.com>
Subject: Re: [PATCH] PR/68089: C++-11: Ingore "alignas(0)".
Date: Sat, 02 Jan 2016 00:53:00 -0000	[thread overview]
Message-ID: <56871F74.8060406@gmail.com> (raw)
In-Reply-To: <20151231115039.GA31709@linux.vnet.ibm.com>

On 12/31/2015 04:50 AM, Dominik Vogt wrote:
> The attached patch fixes C++-11 handling of "alignas(0)" which
> should be ignored but currently generates an error message.  A
> test case is included; the patch has been tested on S390x.  Since
> it's a language issue it should be independent of the backend
> used.

The patch doesn't handle value-dependent expressions(*).  It
seems that the problem is in handle_aligned_attribute() calling
check_user_alignment() with the second argument (ALLOW_ZERO)
set to false.  Calling it with true fixes the problem and handles
value-dependent expressions (I haven't done any more testing beyond
that).

Also, in the test, I noticed the definition of the first struct
is missing the terminating semicolon.

Martin

[*] Such as in the following:

   template <int N> struct A { alignas (N) int i; };
   A<0> a3;

  reply	other threads:[~2016-01-02  0:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-31 11:50 Dominik Vogt
2016-01-02  0:53 ` Martin Sebor [this message]
2016-01-04 11:34   ` Dominik Vogt
2016-01-04 16:55     ` Martin Sebor
2016-02-05 16:29     ` [PING, PATCH] " Dominik Vogt
2016-02-22 11:57     ` [PING 2, " Dominik Vogt
2016-03-02  6:36     ` [PING 3, " Dominik Vogt
2016-03-15  6:12     ` [PING 4, " Dominik Vogt
2016-04-05  9:43     ` [PING 5, " Dominik Vogt
2016-04-28  3:46       ` Jeff Law
2016-04-12  9:04     ` [PING 6, " Dominik Vogt
2016-04-27  7:35     ` [PING 7, " Dominik Vogt
2016-04-29  9:23 ` [PATCH] " Andreas Krebbel

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=56871F74.8060406@gmail.com \
    --to=msebor@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=krebbel@linux.vnet.ibm.com \
    --cc=vogt@linux.vnet.ibm.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).