other/9244: NetBSD sys/cdefs.h needs a fixincludes hack

rearnsha@arm.com rearnsha@arm.com
Mon Jan 13 05:17:00 GMT 2003


>Number:         9244
>Category:       other
>Synopsis:       NetBSD sys/cdefs.h needs a fixincludes hack
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jan 09 06:16:03 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Richard Earnshaw
>Release:        unknown-1.0
>Organization:
>Environment:
any NetBSD target for any relase other than -current.  Any release of GCC with the new C++ parser.
>Description:
The new C++ parser rejects the (invalid) construct

  extern "C" {
    // decls
  };  // Bogus semicolon

But this is the way that __END_DECLS in sys/cdefs.h is defined on existing NetBSD installations.  (Current has now been fixed.)
>How-To-Repeat:
Try to build any C++ program that includes stdio.h with the new compiler on NetBSD
>Fix:
Add a fixincludes rule to fix this case up.  The file is sys/cdefs.h and the macro __END_DECLS is defined to '};' rather than just '}'

Note that the definition of __END_DECLS as an empty define must not be affected; this is needed for C.
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-bugs mailing list