https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97477

Eyal Rozenberg <eyalroz1 at gmx dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |eyalroz1 at gmx dot com

--- Comment #3 from Eyal Rozenberg <eyalroz1 at gmx dot com> ---
"Confirming" (although I can't edit the bug to actually confirm it). This is
not supported by GCC - and it really should.

This is biting me in the *** right now, as I am writing some code using
multi-dimensional C array parameters, and it is quite important for me to make
them restricted.

Without __restrict being supported within the array size square-brackets, I
have to either:

1. Switch to plain pointer parameters and resort to annoying pointer arithmetic
2. Use a reinterpret_cast for every parameter
3. Lose the benefits of restriction

All three options are quite poor and unacceptable IMHO.


I suspect the implementation should not be very difficult, because:

1. restriction _is_ supported as such.
2. The syntax _is_ supported for C.
3. restriction _is_ supported for C++ using the pointer version.

so it should not be much more than tying a few things together and a parsing
tweak.

Reply via email to