Improper use of restrict

Issue #71 resolved
Jerry James created an issue

GCC complains:

m4ri/mzd.c: In function '_mzd_copy_transpose_le64xle64':
m4ri/mzd.c:1079:29: warning: passing argument 1 to restrict-qualified parameter aliases with argument 2 [-Wrestrict]
1079 | _mzd_copy_transpose_64x64(t, t, 1, 1);
| ^ ~

The first two arguments to _mzd_copy_transpose_64x64 are marked RESTRICT. However, the comment above the function notes that the arguments can be the same, and indeed they are the same in this particular case. Therefore, the RESTRICTs should be removed from those two arguments, else the compiler may make invalid optimizations.

Comments (1)

  1. Log in to comment