Bug#85445: marked as done ([PR c/3504]: __alignof__ not working correctly)
Your message dated Sun, 03 Feb 2002 15:00:46 -0500
with message-id <E16XSog-0003sJ-00@auric.debian.org>
and subject line Bug#85445: fixed in gcc-3.0 1:3.0.4ds1-0pre020203
has caused the attached Bug report to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere. Please contact me immediately.)
Debian bug tracking system administrator
(administrator, Debian Bugs database)
--------------------------------------
Received: (at submit) by bugs.debian.org; 10 Feb 2001 00:43:51 +0000
>From herbert@gondor.apana.org.au Fri Feb 09 18:43:50 2001
Return-path: <herbert@gondor.apana.org.au>
Received: from gondor.apana.org.au [::ffff:203.14.152.114]
by master.debian.org with esmtp (Exim 3.12 1 (Debian))
id 14RO8h-0006xp-00; Fri, 09 Feb 2001 18:43:49 -0600
Received: (from herbert@localhost)
by gondor.apana.org.au (8.11.1/8.11.1/Debian 8.11.0-6) id f1A0hdD30093;
Sat, 10 Feb 2001 11:43:39 +1100
Date: Sat, 10 Feb 2001 11:43:39 +1100
Message-Id: <200102100043.f1A0hdD30093@gondor.apana.org.au>
From: <herbert@gondor.apana.org.au>
Subject: gcc: __alignof__ not working correctly
To: submit@bugs.debian.org
X-Mailer: bug 3.3.7
Delivered-To: submit@bugs.debian.org
Package: gcc
Version: 1:2.95.2-20
Severity: normal
According to the documentation,
: When the operand of `__alignof__' is an lvalue rather than a type,
: the value is the largest alignment that the lvalue is known to have.
: It may have this alignment as a result of its data type, or because it
: is part of a structure and inherits alignment from that structure. For
: example, after this declaration:
:
: struct foo { int x; char y; } foo1;
:
: the value of `__alignof__ (foo1.y)' is probably 2 or 4, the same as
: `__alignof__ (int)', even though the data type of `foo1.y' does not
: itself demand any alignment.
However,
$ cat a.c
#include <stdio.h>
#include <netinet/ip_icmp.h>
int main() {
struct icmp foo;
printf("%d\n", __alignof__(foo.icmp_dun));
printf("%d\n", __alignof__(foo.icmp_data));
return 0;
}
$ make a
cc a.c -o a
$ ./a
4
1
$
where struct icmp is defined as,
struct icmp
{
u_int8_t icmp_type; /* type of message, see below */
u_int8_t icmp_code; /* type sub code */
u_int16_t icmp_cksum; /* ones complement checksum of struct */
union
{
u_char ih_pptr; /* ICMP_PARAMPROB */
struct in_addr ih_gwaddr; /* gateway address */
struct ih_idseq /* echo datagram */
{
u_int16_t icd_id;
u_int16_t icd_seq;
} ih_idseq;
u_int32_t ih_void;
/* ICMP_UNREACH_NEEDFRAG -- Path MTU Discovery (RFC1191) */
struct ih_pmtu
{
u_int16_t ipm_void;
u_int16_t ipm_nextmtu;
} ih_pmtu;
struct ih_rtradv
{
u_int8_t irt_num_addrs;
u_int8_t irt_wpa;
u_int16_t irt_lifetime;
} ih_rtradv;
} icmp_hun;
#define icmp_pptr icmp_hun.ih_pptr
#define icmp_gwaddr icmp_hun.ih_gwaddr
#define icmp_id icmp_hun.ih_idseq.icd_id
#define icmp_seq icmp_hun.ih_idseq.icd_seq
#define icmp_void icmp_hun.ih_void
#define icmp_pmvoid icmp_hun.ih_pmtu.ipm_void
#define icmp_nextmtu icmp_hun.ih_pmtu.ipm_nextmtu
#define icmp_num_addrs icmp_hun.ih_rtradv.irt_num_addrs
#define icmp_wpa icmp_hun.ih_rtradv.irt_wpa
#define icmp_lifetime icmp_hun.ih_rtradv.irt_lifetime
union
{
struct
{
u_int32_t its_otime;
u_int32_t its_rtime;
u_int32_t its_ttime;
} id_ts;
struct
{
struct ip idi_ip;
/* options and then 64 bits of data */
} id_ip;
struct icmp_ra_addr id_radv;
u_int32_t id_mask;
u_int8_t id_data[1];
} icmp_dun;
#define icmp_otime icmp_dun.id_ts.its_otime
#define icmp_rtime icmp_dun.id_ts.its_rtime
#define icmp_ttime icmp_dun.id_ts.its_ttime
#define icmp_ip icmp_dun.id_ip.idi_ip
#define icmp_radv icmp_dun.id_radv
#define icmp_mask icmp_dun.id_mask
#define icmp_data icmp_dun.id_data
};
So something is amiss here. I've reproduced this with gcc-2.95 2.95.3.ds3-4
as well.
-- System Information
Debian Release: testing/unstable
Kernel Version: Linux gondor 2.2.17 #1 Mon Sep 11 22:22:16 EST 2000 i586 unknown
Versions of the packages gcc depends on:
ii binutils 2.10.1.0.2-1 The GNU assembler, linker and binary utiliti
ii cpp 2.95.2-20 The GNU C preprocessor.
ii libc6 2.2.1-1 GNU C Library: Shared libraries and Timezone
---------------------------------------
Received: (at 85445-close) by bugs.debian.org; 3 Feb 2002 20:04:44 +0000
>From troup@auric.debian.org Sun Feb 03 14:04:44 2002
Return-path: <troup@auric.debian.org>
Received: from auric.debian.org [206.246.226.45] (mail)
by master.debian.org with esmtp (Exim 3.12 1 (Debian))
id 16XSsW-0005vg-00; Sun, 03 Feb 2002 14:04:44 -0600
Received: from troup by auric.debian.org with local (Exim 3.12 1 (Debian))
id 16XSog-0003sJ-00; Sun, 03 Feb 2002 15:00:46 -0500
From: Matthias Klose <doko@debian.org>
To: 85445-close@bugs.debian.org
X-Katie: $Revision: 1.68 $
Subject: Bug#85445: fixed in gcc-3.0 1:3.0.4ds1-0pre020203
Message-Id: <E16XSog-0003sJ-00@auric.debian.org>
Sender: James Troup <troup@auric.debian.org>
Date: Sun, 03 Feb 2002 15:00:46 -0500
Delivered-To: 85445-close@bugs.debian.org
We believe that the bug you reported is fixed in the latest version of
gcc-3.0, which has been installed in the Debian FTP archive:
cpp-3.0-doc_3.0.4-0pre020203_all.deb
to pool/main/g/gcc-3.0/cpp-3.0-doc_3.0.4-0pre020203_all.deb
cpp-3.0_3.0.4-0pre020203_i386.deb
to pool/main/g/gcc-3.0/cpp-3.0_3.0.4-0pre020203_i386.deb
fastjar_3.0.4-0pre020203_i386.deb
to pool/main/g/gcc-3.0/fastjar_3.0.4-0pre020203_i386.deb
fixincludes_3.0.4-0pre020203_i386.deb
to pool/main/g/gcc-3.0/fixincludes_3.0.4-0pre020203_i386.deb
g++-3.0_3.0.4-0pre020203_i386.deb
to pool/main/g/gcc-3.0/g++-3.0_3.0.4-0pre020203_i386.deb
g77-3.0-doc_3.0.4-0pre020203_all.deb
to pool/main/g/gcc-3.0/g77-3.0-doc_3.0.4-0pre020203_all.deb
g77-3.0_3.0.4-0pre020203_i386.deb
to pool/main/g/gcc-3.0/g77-3.0_3.0.4-0pre020203_i386.deb
gcc-3.0-base_3.0.4-0pre020203_all.deb
to pool/main/g/gcc-3.0/gcc-3.0-base_3.0.4-0pre020203_all.deb
gcc-3.0-doc_3.0.4-0pre020203_all.deb
to pool/main/g/gcc-3.0/gcc-3.0-doc_3.0.4-0pre020203_all.deb
gcc-3.0_3.0.4-0pre020203_i386.deb
to pool/main/g/gcc-3.0/gcc-3.0_3.0.4-0pre020203_i386.deb
gcc-3.0_3.0.4ds1-0pre020203.diff.gz
to pool/main/g/gcc-3.0/gcc-3.0_3.0.4ds1-0pre020203.diff.gz
gcc-3.0_3.0.4ds1-0pre020203.dsc
to pool/main/g/gcc-3.0/gcc-3.0_3.0.4ds1-0pre020203.dsc
gcc-3.0_3.0.4ds1.orig.tar.gz
to pool/main/g/gcc-3.0/gcc-3.0_3.0.4ds1.orig.tar.gz
gcj-3.0_3.0.4-0pre020203_i386.deb
to pool/main/g/gcc-3.0/gcj-3.0_3.0.4-0pre020203_i386.deb
gij-3.0_3.0.4-0pre020203_i386.deb
to pool/main/g/gcc-3.0/gij-3.0_3.0.4-0pre020203_i386.deb
gobjc-3.0_3.0.4-0pre020203_i386.deb
to pool/main/g/gcc-3.0/gobjc-3.0_3.0.4-0pre020203_i386.deb
libffi2-dev_3.0.4-0pre020203_i386.deb
to pool/main/g/gcc-3.0/libffi2-dev_3.0.4-0pre020203_i386.deb
libffi2_3.0.4-0pre020203_i386.deb
to pool/main/g/gcc-3.0/libffi2_3.0.4-0pre020203_i386.deb
libgcc1_3.0.4-0pre020203_i386.deb
to pool/main/g/gcc-3.0/libgcc1_3.0.4-0pre020203_i386.deb
libgcj2-dev_3.0.4-0pre020203_i386.deb
to pool/main/g/gcc-3.0/libgcj2-dev_3.0.4-0pre020203_i386.deb
libgcj2_3.0.4-0pre020203_i386.deb
to pool/main/g/gcc-3.0/libgcj2_3.0.4-0pre020203_i386.deb
libobjc1_3.0.4-0pre020203_i386.deb
to pool/main/g/gcc-3.0/libobjc1_3.0.4-0pre020203_i386.deb
libstdc++3-dbg_3.0.4-0pre020203_i386.deb
to pool/main/g/gcc-3.0/libstdc++3-dbg_3.0.4-0pre020203_i386.deb
libstdc++3-dev_3.0.4-0pre020203_i386.deb
to pool/main/g/gcc-3.0/libstdc++3-dev_3.0.4-0pre020203_i386.deb
libstdc++3-doc_3.0.4-0pre020203_all.deb
to pool/main/g/gcc-3.0/libstdc++3-doc_3.0.4-0pre020203_all.deb
libstdc++3_3.0.4-0pre020203_i386.deb
to pool/main/g/gcc-3.0/libstdc++3_3.0.4-0pre020203_i386.deb
protoize_3.0.4-0pre020203_i386.deb
to pool/main/g/gcc-3.0/protoize_3.0.4-0pre020203_i386.deb
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 85445@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Matthias Klose <doko@debian.org> (supplier of updated gcc-3.0 package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Format: 1.7
Date: Sun, 3 Feb 2002 14:47:14 +0100
Source: gcc-3.0
Binary: gcc-3.0-sparc64 gcc-3.0-soft-float libstdc++3 libgcc1 gobjc-3.0 gcc-3.0-base libffi2-dev fastjar cpp-3.0-doc protoize cpp-3.0 g++-3.0 libobjc1 libstdc++3-dev g77-3.0 libstdc++3-doc libgcj2 libffi2 g77-3.0-doc fixincludes gcc-3.0 libgcc1-sparc64 gcj-3.0 gcc-3.0-doc libstdc++3-dbg gcc-3.0-nof libgcj2-dev gij-3.0
Architecture: source i386 all
Version: 1:3.0.4ds1-0pre020203
Distribution: unstable
Urgency: medium
Maintainer: Debian GCC maintainers <debian-gcc@lists.debian.org>
Changed-By: Matthias Klose <doko@debian.org>
Description:
cpp-3.0 - The GNU C preprocessor.
cpp-3.0-doc - Documentation for the GNU C preprocessor (cpp).
fastjar - Jar creation utility
fixincludes - Fix non-ANSI header files
g++-3.0 - The GNU C++ compiler.
g77-3.0 - The GNU Fortran 77 compiler.
g77-3.0-doc - Documentation for the GNU Fortran compiler (g77).
gcc-3.0 - The GNU C compiler.
gcc-3.0-base - The GNU Compiler Collection (base package).
gcc-3.0-doc - Documentation for the GNU compilers (gcc, gobjc, g++).
gcj-3.0 - The GNU compiler for Java(TM).
gij-3.0 - The GNU Java bytecode interpreter.
gobjc-3.0 - The GNU Objective-C compiler.
libffi2 - Foreign Function Interface library runtime
libffi2-dev - Foreign Function Interface library development
libgcc1 - GCC support library.
libgcj2 - Java runtime library for use with gcj
libgcj2-dev - Java development headers and static library for use with gcj
libobjc1 - Runtime library for GNU Objective-C applications.
libstdc++3 - The GNU stdc++ library version 3
libstdc++3-dbg - The GNU stdc++ library version 3 (debugging files)
libstdc++3-dev - The GNU stdc++ library version 3 (development files)
libstdc++3-doc - The GNU stdc++ library version 3 (documentation files)
protoize - Create/remove ANSI prototypes from C code
Closes: 85445 131977 131985
Changes:
gcc-3.0 (1:3.0.4ds1-0pre020203) unstable; urgency=medium
.
* One release critical bug outstanding:
- bootstrap error on arm.
* Update to CVS sources (20020203 gcc-3_0-branch).
* Fixed upstream: PR c/3504: Correct documentation of __alignof__.
Closes: #85445.
* Remove libgcc-powerpc patch, integrated upstream (closes: #131977).
* Tighten binutils build dependency (to address #126162).
* Move jv-convert to gcj package (closes: #131985).
Files:
2d9f76afa450dc63fc69f4c75f85e11d 1671 devel standard gcc-3.0_3.0.4ds1-0pre020203.dsc
974af7f0db2d8e66b2617d97c4e72ad8 13035019 devel standard gcc-3.0_3.0.4ds1.orig.tar.gz
75125aec24499f1e01d61723eecac4af 4342010 devel standard gcc-3.0_3.0.4ds1-0pre020203.diff.gz
4d6c1437469f8f75480a7d45904de192 114838 devel standard gcc-3.0-base_3.0.4-0pre020203_all.deb
59bb9c20e2fd6ad29df973a6e32efec8 71354 doc optional cpp-3.0-doc_3.0.4-0pre020203_all.deb
fc2416cac18e5659c93719fb67c58049 5907232 doc optional libstdc++3-doc_3.0.4-0pre020203_all.deb
24923511d3c34934ec22d922dc3464bb 308400 doc optional g77-3.0-doc_3.0.4-0pre020203_all.deb
68d70af1eb2d8304745ea6c02b64784d 546994 doc optional gcc-3.0-doc_3.0.4-0pre020203_all.deb
8150b8a3b29777d1409f3e20e8837cb3 46736 libs standard libgcc1_3.0.4-0pre020203_i386.deb
95f474712d03c3edf52581917ec969e1 115128 interpreters standard cpp-3.0_3.0.4-0pre020203_i386.deb
1b7b38567469c160fe8253cffd6cf1e4 22980 devel optional protoize_3.0.4-0pre020203_i386.deb
fbad29be4fede9af77ac4a3c57994cd9 48260 devel extra fixincludes_3.0.4-0pre020203_i386.deb
a4ed67f9abae2a29dba45c30e483840e 1189104 devel optional gobjc-3.0_3.0.4-0pre020203_i386.deb
3854de233bda153eec25400e10a821c7 103766 libs optional libobjc1_3.0.4-0pre020203_i386.deb
4d3fb77f14920f636a49e28642811b99 1367052 devel optional gcj-3.0_3.0.4-0pre020203_i386.deb
e650ec4a0f7f4f0d6155c0c57e1ec027 8460 devel optional gij-3.0_3.0.4-0pre020203_i386.deb
ee587f832902acbaadc0f908bcd2f0e8 1856846 libs optional libgcj2_3.0.4-0pre020203_i386.deb
496340e96c0b7af80af2a8099a1f39d2 3854794 devel optional libgcj2-dev_3.0.4-0pre020203_i386.deb
0b598b4a9def4629a420e4091d878da2 90482 devel extra fastjar_3.0.4-0pre020203_i386.deb
41ef5ed4324ab43f5c63de482447bcc1 5244 libs optional libffi2_3.0.4-0pre020203_i386.deb
ed070eb5c9b3f397676cac0c03adc4fd 10732 devel optional libffi2-dev_3.0.4-0pre020203_i386.deb
22ce91ba50b7c1123523c8877ccb082e 1434336 devel optional g++-3.0_3.0.4-0pre020203_i386.deb
7dc3df63f39afa168a8c6f6b8f118adb 201570 base standard libstdc++3_3.0.4-0pre020203_i386.deb
c2f001c037023f3248f054eaeccb5946 563660 devel optional libstdc++3-dev_3.0.4-0pre020203_i386.deb
0184e080daea1206301a8de1a1539596 587254 devel extra libstdc++3-dbg_3.0.4-0pre020203_i386.deb
9dae9ee98f32d09cd3c71fd3ea38992b 1376412 devel optional g77-3.0_3.0.4-0pre020203_i386.deb
ece0e87aac065519942d2fb5bd3ecfa7 1445742 devel standard gcc-3.0_3.0.4-0pre020203_i386.deb
-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: noconv
Comment: Requires PGP version 2.6 or later.
iQEVAwUBPF2N6QuDzMCIcnEhAQHLBwgAxIUlAzTFljHmKWlUTA9wW6N8UhZvninO
xUkaaKbLkSnCycTStbDQVoBlF3q8J9jZcAN9PTRIfhiyMfygmfP8VlLR+pwYGphy
PAYvGvm3E0a8obDYusCYpDbsmlBjY/UC+327UPRYMSi8E5rbKOa9UE55Jgyt/HJb
+R0KL+p+mUfF7i73sGDTg7oHXU0dGIJfYVwfckAw2Xqn4G5ls6UX1lrInbu3x3+T
3sMpp7dTow9TyQ3ldRq7EUILnsmYw/h6LF+nyQrd/kRtY7eRInYMEa4Atb1rNhza
QQZO2ToRKKtCFNt+jb/Kb6VU5DSrmj6Da5QDhuls51331Bx7W41hOg==
=e/0U
-----END PGP SIGNATURE-----
Reply to: