regression: g++ produces spurious alignment errors for prototypes
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gcc |
Invalid
|
Medium
|
|||
gcc-4.3 (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: gcc
This appeared recently when upgrading from gutsy to intrepid. Compiling the following with g++
void toto1(double*const __attribute_
void toto2(double* const (&X)[1]);
produdes
g++ -c -o test.o test.cc
test.cc:2: error: alignment of array elements is greater than element size
Observe the `2' in the error message, the error is reported for toto2.
(For toto1 an error would be acceptable, I think).
But even worse, if we take
void toto0(double* const (&X)[1]);
void toto1(double*const __attribute_
void toto2(double* const (&X)[1]);
All three prototypes compile flawlessly.
This particular testing was done with 4:4.3.1-1ubuntu2 on an 8.10 amd64,
but we observed the same thing on 8.10 i386
Previously, everything was working well on 8.04.
ProblemType: Bug
Architecture: amd64
DistroRelease: Ubuntu 8.10
Package: g++ 4:4.3.1-1ubuntu2
ProcEnviron:
SHELL=/bin/tcsh
PATH=/
LANG=de_
SourcePackage: gcc-defaults
Uname: Linux 2.6.27.5 x86_64
Changed in gcc: | |
status: | Unknown → New |
Changed in gcc: | |
importance: | Unknown → Medium |
status: | New → Invalid |
[This is a copy of a bug that I posted a year ago on ubuntu's launchpad.
Nothing happened there, and now I am still observing the same problem
with gcc 4.4.1 on a newly upgraded ubuntu 9.10]
Compiling the following with g++
void toto1(double*const __attribute_ _((aligned( 16))) X);
void toto2(double* const (&X)[1]);
produdes
g++ -c -o test.o test.cc
test.cc:2: error: alignment of array elements is greater than element size
Observe the `2' in the error message, the error is reported for toto2.
(For toto1 an error would be acceptable, I think).
But even worse, if we take
void toto0(double* const (&X)[1]); _((aligned( 16))) X);
void toto1(double*const __attribute_
void toto2(double* const (&X)[1]);
All three prototypes compile flawlessly.