Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 08 Dec 2011 21:40:55 +0100
From:      Andreas Tobler <andreast@FreeBSD.org>
To:        David Chisnall <theraven@FreeBSD.org>
Cc:        svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org
Subject:   Re: svn commit: r228330 - in head: include sys/sys
Message-ID:  <4EE120D7.10903@FreeBSD.org>
In-Reply-To: <201112072117.pB7LHoaL055972@svn.freebsd.org>
References:  <201112072117.pB7LHoaL055972@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 07.12.11 22:17, David Chisnall wrote:
> Author: theraven
> Date: Wed Dec  7 21:17:50 2011
> New Revision: 228330
> URL: http://svn.freebsd.org/changeset/base/228330
>
> Log:
>    As per das@'s suggestion, s/__noreturn/_Noreturn/, since the latter is an
>    identifier reserved for the implementation in C99 and earlier so there is
>    no sensible reason for introducing yet another reserved identifier when we
>    could just use the one C1x uses.
>
>    Approved by:	brooks (mentor)

> Modified: head/sys/sys/cdefs.h
> ==============================================================================
> --- head/sys/sys/cdefs.h	Wed Dec  7 21:02:35 2011	(r228329)
> +++ head/sys/sys/cdefs.h	Wed Dec  7 21:17:50 2011	(r228330)
> @@ -220,13 +220,13 @@
>
>
>   #if defined(__cplusplus)&&  __cplusplus>= 201103L
> -#define	__noreturn		[[noreturn]]
> +#define	_Noreturn		[[noreturn]]
>   #elif defined(__STDC_VERSION__)&&  __STDC_VERSION__>  201000L
> -#define	__noreturn		_Noreturn
> +/* Do nothing - _Noreturn is a keyword */
>   #elif defined(__GNUC__)
> -#define	__noreturn		__attribute__((__noreturn__))
> +#define	_Noreturn		__attribute__((__noreturn__))

This and the previous commit broke bootstrapping gcc.
The problem is this:
/export/devel/build/gcc/head/objdir/./gcc/include-fixed/stdlib.h:96:1: 
error: expected unqualified-id before '[' token

Line in question is: _Noreturn void	 abort(void);
Where _Noreturn gets expanded to [[noreturn]]

I helped myself with adding the below. Well. No clue if it is correct. 
But at least I can continue building gcc trunk.

Thanks,
Andreas

Index: cdefs.h
===================================================================
--- cdefs.h	(revision 228352)
+++ cdefs.h	(working copy)
@@ -219,7 +219,7 @@
  #endif


-#if defined(__cplusplus) && __cplusplus >= 201103L
+#if defined(__cplusplus) && __cplusplus >= 201103L && !defined(__GNUC__)
  #define	_Noreturn		[[noreturn]]
  #elif defined(__STDC_VERSION__) && __STDC_VERSION__ > 201000L
  /* Do nothing - _Noreturn is a keyword */



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