public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/7598: offsetof broken
@ 2002-08-14  9:06 nathan
  0 siblings, 0 replies; 3+ messages in thread
From: nathan @ 2002-08-14  9:06 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nathan, nobody, schwab

Synopsis: offsetof broken

Responsible-Changed-From-To: unassigned->nathan
Responsible-Changed-By: nathan
Responsible-Changed-When: Wed Aug 14 09:04:00 2002
Responsible-Changed-Why:
    my fault
State-Changed-From-To: open->analyzed
State-Changed-By: nathan
State-Changed-When: Wed Aug 14 09:04:00 2002
State-Changed-Why:
    yup

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7598


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

* Re: c++/7598: offsetof broken
@ 2002-08-15  4:44 nathan
  0 siblings, 0 replies; 3+ messages in thread
From: nathan @ 2002-08-15  4:44 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nathan, schwab

Synopsis: offsetof broken

State-Changed-From-To: analyzed->closed
State-Changed-By: nathan
State-Changed-When: Thu Aug 15 03:46:55 2002
State-Changed-Why:
    fixed 
    002-08-15  Nathan Sidwell  <nathan@codesourcery.com>
    
            PR c++/7598
            * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
            regression caused by my 2002-08-08 patch.
    

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7598


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

* c++/7598: offsetof broken
@ 2002-08-14  9:04 Andreas Schwab
  0 siblings, 0 replies; 3+ messages in thread
From: Andreas Schwab @ 2002-08-14  9:04 UTC (permalink / raw)
  To: gcc-gnats


>Number:         7598
>Category:       c++
>Synopsis:       offsetof broken
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Wed Aug 14 08:56:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        3.3 20020814 (experimental)
>Organization:
>Environment:
System: Linux sykes 2.4.18-SMP #1 SMP Thu May 16 09:03:14 UTC 2002 ia64 unknown unknown GNU/Linux
Architecture: ia64

	
host: ia64-suse-linux-gnu
build: ia64-suse-linux-gnu
target: ia64-suse-linux-gnu
configured with: ../configure --host=ia64-suse-linux --enable-shared --enable-threads --with-system-zlib
>Description:
The C++ compiler cannot handle offsetof.
>How-To-Repeat:
$ cat offsetof.cc
typedef long unsigned int size_t;
struct sigcontext
{
  unsigned long int sc_gr[32];
};
typedef struct ucontext
{
  union
  {
    struct
    {
      unsigned long _pad[((size_t) &((struct sigcontext *)0)->sc_gr[0])];
    } _uc;
  } _u;
} ucontext_t;
$ /tmp/cvs/gcc-20020814/Build/gcc/xgcc -B/tmp/cvs/gcc-20020814/Build/gcc/ -S offsetof.cc -v
Reading specs from /tmp/cvs/gcc-20020814/Build/gcc/specs
Configured with: ../configure --host=ia64-suse-linux --enable-shared --enable-threads --with-system-zlib
Thread model: posix
gcc version 3.3 20020814 (experimental)
 /tmp/cvs/gcc-20020814/Build/gcc/cc1plus -quiet -v -iprefix /tmp/cvs/gcc-20020814/Build/gcc/../lib/gcc-lib/ia64-suse-linux/3.3/ -isystem /tmp/cvs/gcc-20020814/Build/gcc/include -D__GNUC__=3 -D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=0 -D__gnu_linux__ -D__linux -D__linux__ -D_LONGLONG -Dlinux -Dunix -D__gnu_linux__ -D__linux -D__linux__ -D_LONGLONG -D__linux__ -D__unix__ -D__linux -D__unix -Asystem=linux -D_GNU_SOURCE -Acpu=ia64 -Amachine=ia64 -D__ia64 -D__ia64__ -D_LP64 -D__LP64__ -D__ELF__ offsetof.cc -D__GNUG__=3 -quiet -dumpbase offsetof.cc -auxbase offsetof -version -o offsetof.s
GNU C++ version 3.3 20020814 (experimental) (ia64-suse-linux)
        compiled by GNU C version 3.3 20020814 (experimental).
ignoring nonexistent directory "/tmp/cvs/gcc-20020814/Build/lib/gcc-lib/ia64-suse-linux/3.3/../../../../include/c++/3.3"
ignoring nonexistent directory "/tmp/cvs/gcc-20020814/Build/lib/gcc-lib/ia64-suse-linux/3.3/../../../../include/c++/3.3/ia64-suse-linux"
ignoring nonexistent directory "/tmp/cvs/gcc-20020814/Build/lib/gcc-lib/ia64-suse-linux/3.3/../../../../include/c++/3.3/backward"
ignoring nonexistent directory "/tmp/cvs/gcc-20020814/Build/lib/gcc-lib/ia64-suse-linux/3.3/include"
ignoring nonexistent directory "/tmp/cvs/gcc-20020814/Build/lib/gcc-lib/ia64-suse-linux/3.3/../../../../ia64-suse-linux/include"
ignoring nonexistent directory "/usr/local/include/c++/3.3"
ignoring nonexistent directory "/usr/local/include/c++/3.3/ia64-suse-linux"
ignoring nonexistent directory "/usr/local/include/c++/3.3/backward"
ignoring nonexistent directory "NONE/include"
ignoring nonexistent directory "/usr/local/lib/gcc-lib/ia64-suse-linux/3.3/include"
ignoring nonexistent directory "/usr/local/ia64-suse-linux/include"
#include "..." search starts here:
#include <...> search starts here:
 /tmp/cvs/gcc-20020814/Build/gcc/include
 /usr/local/include
 /usr/include
End of search list.
offsetof.cc:12: error: size of member `_pad' is not constant
>Fix:
	
>Release-Note:
>Audit-Trail:
>Unformatted:


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

end of thread, other threads:[~2002-08-15 10:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-14  9:06 c++/7598: offsetof broken nathan
  -- strict thread matches above, loose matches on Subject: below --
2002-08-15  4:44 nathan
2002-08-14  9:04 Andreas Schwab

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