public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/53370] New: Unbalanced parenthesis when using __attribute__
@ 2012-05-16  3:06 matias.fontanini at gmail dot com
  2012-05-16 12:34 ` [Bug c++/53370] " paolo.carlini at oracle dot com
  0 siblings, 1 reply; 2+ messages in thread
From: matias.fontanini at gmail dot com @ 2012-05-16  3:06 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 53370
           Summary: Unbalanced parenthesis when using __attribute__
    Classification: Unclassified
           Product: gcc
           Version: 4.5.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: matias.fontanini@gmail.com


When using __attribute__((packed(N))), an unbalanced amount of parenthesis can
be used and no compilation error is detected. The documentation states:

"Note that __attribute__ spelled with two underscores before and two after, and
there are always two sets of parentheses surrounding the contents."

So this looks like a bug. To reproduce this error, compile this:

int main() {
    __attribute__((aligned(16)) char arr[5];
}

Which contains three '(' and two ')' and still compiles. Note that gcc does
detect this error, g++ does not.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-05-16 12:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-16  3:06 [Bug c++/53370] New: Unbalanced parenthesis when using __attribute__ matias.fontanini at gmail dot com
2012-05-16 12:34 ` [Bug c++/53370] " paolo.carlini at oracle dot com

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).