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

jason at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Jul 8 14:54:00 GMT 2011


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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |SUSPENDED
                 CC|                            |jason at gcc dot gnu.org

--- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> 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.



More information about the Gcc-bugs mailing list