[Bug c++/45697] __restrict__ inconsistent in presence of typedefs

2011-07-12 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45697

--- Comment #5 from Jason Merrill  2011-07-12 
12:47:30 UTC ---
Since clang handles this differently, I think I'll leave it as SUSPENDED for
now.


[Bug c++/45697] __restrict__ inconsistent in presence of typedefs

2011-07-11 Thread evan at chromium dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45697

--- Comment #4 from Evan Martin  2011-07-11 22:38:49 
UTC ---
Sorry, I should have linked to the bug that prompted this bug report.
http://code.google.com/p/skia/issues/detail?id=63

Briefly, the Skia library (used by Google Chrome and Android) has usage of
restrict that Clang complains about.  In trying to reduce the problem to a test
case, I encountered the below inconsistency in gcc and thought I'd be a good
citizen to file a bug.  If the Skia code is just wrong by the spec, it's
probably not worth changing gcc.

The Skia usage of restrict presumably worked on some platform, or they wouldn't
have checked it in.  But perhaps it was ignored on those platforms anyway.  I
have asked on the Skia bug for more information.  It seems likely to me this
bug should be WONTFIXed.


[Bug c++/45697] __restrict__ inconsistent in presence of typedefs

2011-07-08 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45697

--- Comment #3 from Jason Merrill  2011-07-08 
14:57:52 UTC ---
Created attachment 24715
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24715
patch

But here's a patch against pre-4.7 to do what you want.


[Bug c++/45697] __restrict__ inconsistent in presence of typedefs

2011-07-08 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45697

Jason Merrill  changed:

   What|Removed |Added

 Status|NEW |SUSPENDED
 CC||jason at gcc dot gnu.org

--- Comment #2 from Jason Merrill  2011-07-08 
14:53:33 UTC ---
C++ ignores inappropriate cv-qualifications introduced through the use of a
typedef or template type parameter:

int i;
typedef int& IR;
IR const ir1 = i; // OK
int& const ir2 = i; // error

G++ is treating restrict the same way.  It's not clear to me that this is the
right thing to do, but it's not clear that it's wrong, either.


[Bug c++/45697] __restrict__ inconsistent in presence of typedefs

2010-09-17 Thread rguenth at gcc dot gnu dot org


--- Comment #1 from rguenth at gcc dot gnu dot org  2010-09-17 09:39 ---
Confirmed.  Both variants are rejected when using the C frontend.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Keywords||accepts-invalid
   Last reconfirmed|-00-00 00:00:00 |2010-09-17 09:39:43
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45697