From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27373 invoked by alias); 25 Nov 2014 12:33:22 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 27315 invoked by uid 48); 25 Nov 2014 12:33:19 -0000 From: "richard at netbsd dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/61649] fixincludes update for solaris___restrict in sys/feature_tests.h on Illumos Date: Tue, 25 Nov 2014 12:33:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.7.3 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: richard at netbsd dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-11/txt/msg02971.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61649 --- Comment #3 from Richard PALO --- No. Prior to fixincludes, sys/feature_tests.h in SunOS looks like the following: #if (defined(__STDC__) && defined(_STDC_C99)) #define _RESTRICT_KYWD restrict #else #define _RESTRICT_KYWD #endif Illumos has since https://www.illumos.org/issues/2941 the following: #if (defined(__STDC__) && defined(_STDC_C99)) && !defined(__cplusplus) #define _RESTRICT_KYWD restrict #else #define _RESTRICT_KYWD #endif The net effect of my patch is to support both variants in producing the following: #if (defined(__STDC__) && defined(_STDC_C99)) #ifdef __cplusplus #define _RESTRICT_KYWD __restrict #else #define _RESTRICT_KYWD restrict #endif #else #define _RESTRICT_KYWD #endif