Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Jan 2000 15:02:22 +0600 (NOVT)
From:      Max Khon <fjoe@lark.websci.ru>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   kern/16170: compiling machine/setjmp.h with g++
Message-ID:  <200001180902.PAA67829@lark.websci.ru>

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


>Number:         16170
>Category:       kern
>Synopsis:       compiling machine/setjmp.h with g++
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jan 18 01:10:01 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Max Khon
>Release:        FreeBSD 4.0-CURRENT i386
>Organization:
WebSci Technologies Inc.
>Environment:

lark:~$uname -a
FreeBSD lark.websci.ru 4.0-CURRENT FreeBSD 4.0-CURRENT #4: Fri Jan 14 10:26:27 NOVT 2000     fjoe@lark.websci.ru:/usr/src/sys/compile/lark  i386
lark:~$g++ -v
Using builtin specs.
gcc version 2.95.2 19991024 (release)
lark:~$

>Description:

	C++ does not like tagless symbols

>How-To-Repeat:

sample program:
--- cut here ---
#include <setjmp.h>

int
foo(jmp_buf *j)
{
}
--- cut here ---

lark:~$g++ -c foo.cc
foo.cc:4: non-local function `int foo({anonymous struct} (*)[1])' uses anonymous type
lark:~$

>Fix:

*** setjmp.h.orig	Tue Jan 18 14:52:29 2000
--- setjmp.h	Tue Jan 18 14:51:53 2000
***************
*** 40,46 ****
   * internally to avoid some run-time errors for mismatches.
   */
  #ifndef _ANSI_SOURCE
! typedef struct { int _sjb[_JBLEN + 1]; } sigjmp_buf[1];
  #endif /* not ANSI */
  
! typedef struct { int _jb[_JBLEN + 1]; } jmp_buf[1];
--- 40,46 ----
   * internally to avoid some run-time errors for mismatches.
   */
  #ifndef _ANSI_SOURCE
! typedef struct _sigjmp_buf { int _sjb[_JBLEN + 1]; } sigjmp_buf[1];
  #endif /* not ANSI */
  
! 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?200001180902.PAA67829>