public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/18182] New: Incorrect processing of __attribute__ by the C++ parser
@ 2004-10-27 16:19 uweigand at gcc dot gnu dot org
2004-10-28 14:29 ` [Bug c++/18182] " pinskia at gcc dot gnu dot org
0 siblings, 1 reply; 4+ messages in thread
From: uweigand at gcc dot gnu dot org @ 2004-10-27 16:19 UTC (permalink / raw)
To: gcc-bugs
The C++ parser appears to ignore attributes that apply to nested declarators.
E.g. when trying to define an 'SImode-pointer to int' by
typedef int * __attribute__ ((mode (SI))) t;
on s390x-ibm-linux, the C++ parser silently ignores the attribute.
The following test case:
#include <stdio.h>
typedef int * __attribute__ ((mode (SI))) t;
int main (void)
{
t x;
printf ("%d %d\n", sizeof (x), sizeof (*x));
}
gives the correct result ("4 4") when compiled with gcc,
but the incorrect result "8 4" when compiled with g++.
[ For a simpler test case on systems without non-Pmode pointers,
try using an invalid mode like:
typedef int * __attribute__ ((mode (TI))) t;
With gcc, this gives an error; g++ accepts the code. ]
See the discussion at
http://gcc.gnu.org/ml/gcc/2004-10/msg01081.html
for further details.
--
Summary: Incorrect processing of __attribute__ by the C++ parser
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: uweigand at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18182
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/18182] Incorrect processing of __attribute__ by the C++ parser
2004-10-27 16:19 [Bug c++/18182] New: Incorrect processing of __attribute__ by the C++ parser uweigand at gcc dot gnu dot org
@ 2004-10-28 14:29 ` pinskia at gcc dot gnu dot org
0 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-28 14:29 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-28 14:29 -------
Confirmed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |wrong-code
Last reconfirmed|0000-00-00 00:00:00 |2004-10-28 14:29:13
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18182
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/18182] Incorrect processing of __attribute__ by the C++ parser
[not found] <bug-18182-1501@http.gcc.gnu.org/bugzilla/>
2005-10-27 16:30 ` pinskia at gcc dot gnu dot org
@ 2006-07-14 19:27 ` uweigand at gcc dot gnu dot org
1 sibling, 0 replies; 4+ messages in thread
From: uweigand at gcc dot gnu dot org @ 2006-07-14 19:27 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from uweigand at gcc dot gnu dot org 2006-07-14 19:27 -------
Yes, looks like this is long fixed. Closing bug now.
--
uweigand at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18182
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/18182] Incorrect processing of __attribute__ by the C++ parser
[not found] <bug-18182-1501@http.gcc.gnu.org/bugzilla/>
@ 2005-10-27 16:30 ` pinskia at gcc dot gnu dot org
2006-07-14 19:27 ` uweigand at gcc dot gnu dot org
1 sibling, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-27 16:30 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2005-10-27 16:30 -------
I think this has been fixed as I get an error on i686-pc-linux-gnu with your
non-Pmode pointers expample. This was on the mainline.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18182
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-07-14 19:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-27 16:19 [Bug c++/18182] New: Incorrect processing of __attribute__ by the C++ parser uweigand at gcc dot gnu dot org
2004-10-28 14:29 ` [Bug c++/18182] " pinskia at gcc dot gnu dot org
[not found] <bug-18182-1501@http.gcc.gnu.org/bugzilla/>
2005-10-27 16:30 ` pinskia at gcc dot gnu dot org
2006-07-14 19:27 ` uweigand at gcc dot gnu dot org
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).