public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/61649] New: fixincludes update for solaris___restrict in sys/feature_tests.h on Illumos
@ 2014-06-29 17:11 richard at netbsd dot org
  2014-11-22 10:55 ` [Bug c++/61649] " richard at netbsd dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: richard at netbsd dot org @ 2014-06-29 17:11 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-07-02 14:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-29 17:11 [Bug c++/61649] New: fixincludes update for solaris___restrict in sys/feature_tests.h on Illumos richard at netbsd dot org
2014-11-22 10:55 ` [Bug c++/61649] " richard at netbsd dot org
2014-11-25 11:30 ` redi at gcc dot gnu.org
2014-11-25 12:33 ` richard at netbsd dot org
2014-11-25 12:41 ` richard at netbsd dot org
2015-07-02 14:53 ` richard at netbsd dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).