Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Sep 2000 11:17:01 -0700 (PDT)
From:      earl_chew@agilent.com
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   i386/21427: g++ barfs on anonymous i386 sigjmp_buf structure
Message-ID:  <20000920181701.21CFD37B422@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         21427
>Category:       i386
>Synopsis:       g++ barfs on anonymous i386 sigjmp_buf structure
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Sep 20 11:20:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Earl Chew
>Release:        4.0-RELEASE
>Organization:
Agilent Technologies
>Environment:
FreeBSD bna2188.canada.agilent.com 4.0-RELEASE FreeBSD 4.0-RELEASE #0: Mon Mar 2
0 22:50:22 GMT 2000     root@monster.cdrom.com:/usr/src/sys/compile/GENERIC  i38
6
>Description:
The definition in machine/setjmp.h for i386 is:

typedef struct { int _sjb[_JBLEN + 1]; } sigjmp_buf[1];
typedef struct { int _jb[_JBLEN + 1]; } jmp_buf[1];

g++ complains when it cannot resolve the name of the structure.


>How-To-Repeat:
The following C++ program:

#include <setjmp.h>

sigjmp_buf& foo();

produces the following message:

foo.cc:3: non-local function `struct {anonymous} (& foo())[1]' uses anonymous ty
pe

>Fix:
typedef struct _sigjmp_buf { int _sjb[_JBLEN + 1]; } sigjmp_buf[1];
typedef struct _jmp_buf { int _jb[_JBLEN + 1]; } jmp_buf[1];


>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000920181701.21CFD37B422>