This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/49347] G++-4.6 Solaris incorrectly defines _RESTRICT_KYWD to __restrict
- From: "edwintorok at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 9 Jun 2011 18:29:38 +0000
- Subject: [Bug c++/49347] G++-4.6 Solaris incorrectly defines _RESTRICT_KYWD to __restrict
- Auto-submitted: auto-generated
- References: <bug-49347-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49347
--- Comment #2 from TÃrÃk Edwin <edwintorok at gmail dot com> 2011-06-09 18:29:22 UTC ---
(In reply to comment #1)
> (In reply to comment #0)
> >
> > Don't know where the #define to __restrict on __cplusplus comes from, but it is
> > wrong.
>
> No, it's correct, see
> http://gcc.gnu.org/onlinedocs/gcc/Restricted-Pointers.html
>
>
> The bug is that G++ can't parse __restrict in an array parameter:
>
> extern int f( char *const envp[__restrict] );
>
> The C front end accepts this, but not the C++ one.
Is that planned to be fixed for the next release?
If not then as a workaround that fix-includes header could #define
_RESTRICY_KYWD to empty.