From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3453 invoked by alias); 29 Jun 2014 17:11:51 -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 3398 invoked by uid 48); 29 Jun 2014 17:11:43 -0000 From: "richard at netbsd dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/61649] New: fixincludes update for solaris___restrict in sys/feature_tests.h on Illumos Date: Sun, 29 Jun 2014 17:11:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: 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-06/txt/msg02358.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61649 Bug ID: 61649 Summary: fixincludes update for solaris___restrict in sys/feature_tests.h on Illumos Product: gcc Version: 4.7.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: richard at netbsd dot org Created attachment 33031 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33031&action=edit patch to existing fixincludes/inclhack.def from gcc-4.7.3 Due to an update to sys/feature_tests.h as indicated here (https://illumos.org/issues/2941), Illumos has "broken" the fixincludes solaris___restrict hack as is evident by the current result in $PREFIX/gcc47/lib/.../include-fixed/sys/feature_tests.h /* * The following macro defines a value for the ISO C99 restrict * keyword so that _RESTRICT_KYWD resolves to "restrict" if * an ISO C99 compiler is used and "" (null string) if any other * compiler is used. This allows for the use of single prototype * declarations regardless of compiler version. */ #if (defined(__STDC__) && defined(_STDC_C99)) && !defined(__cplusplus) #ifdef __cplusplus #define _RESTRICT_KYWD __restrict #else #define _RESTRICT_KYWD restrict #endif #else #define _RESTRICT_KYWD #endif The attached patch seem to work around this by allowing both the standard and the Illumos forms to be updated. The test/base/sys/feature_tests.h patch is as follows: --- fixincludes/tests/base/sys/feature_tests.h.orig 2010-06-21 15:27:29.000000000 +0000 +++ fixincludes/tests/base/sys/feature_tests.h @@ -10,6 +10,7 @@ #if defined( SOLARIS___RESTRICT_CHECK ) +#if (defined(__STDC__) && defined(_STDC_C99)) #ifdef __cplusplus #define _RESTRICT_KYWD __restrict #else