| Summary: | g++ barfs on anonymous i386 sigjmp_buf structure | ||
|---|---|---|---|
| Product: | Base System | Reporter: | earl_chew <earl_chew> |
| Component: | i386 | Assignee: | freebsd-bugs (Nobody) <bugs> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | 4.0-RELEASE | ||
| Hardware: | Any | ||
| OS: | Any | ||
An additional problem with i386 machine/setjmp.h is that doesn't
have #inclusion guards to prevent problems with multiple inclusions.
Something like:
#ifndef _MACHINE_SETJMP_H
#define _MACHINE_SETJMP_H
...
#endif
Earl
--
>----------------------------------------------------------------------+
> Earl Chew http://www.agilent.com |
> Agilent Technologies mailto:earl_chew@agilent.com |
> Advanced Networks Division Tel: +1 604 454 3411 |
> 2500-4710 Kingsway Fax: +1 604 454 3401 |
> Burnaby BC V5H 4M2 Canada |
>----------------------------------------------------------------------+
State Changed From-To: open->closed Equivalent to PR 16170. Fixed in -current. Will be fixed in RELENG_4 in a few days. Doesn't affect RELENG_3. On Wed, 20 Sep 2000, Earl Chew wrote:
> An additional problem with i386 machine/setjmp.h is that doesn't
> have #inclusion guards to prevent problems with multiple inclusions.
This can be considered as a feature. <machine/setjmp.h> should only
be included by <setjmp.h> and there is an inclusion in the latter.
Bruce
I hit this today with 4.1-STABLE. The last update to the PR was Oct.06 (almost two weeks). Any ETA's on MFCs BDE? (TLA-itis!) -- Andy Newman, Principal Software Engineer, Silverbrook Research On Wed, 18 Oct 2000, Andy Newman wrote:
> I hit this today with 4.1-STABLE. The last update to the PR was Oct.06
> (almost two weeks). Any ETA's on MFCs BDE? (TLA-itis!)
Done. So it should be fixed in 4.2.
Bruce
|
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. Fix: typedef struct _sigjmp_buf { int _sjb[_JBLEN + 1]; } sigjmp_buf[1]; typedef struct _jmp_buf { int _jb[_JBLEN + 1]; } jmp_buf[1]; 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