This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/45697] __restrict__ inconsistent in presence of typedefs
- From: "jason at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 8 Jul 2011 14:53:55 +0000
- Subject: [Bug c++/45697] __restrict__ inconsistent in presence of typedefs
- Auto-submitted: auto-generated
- References: <bug-45697-4@http.gcc.gnu.org/bugzilla/>
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.