Skip to content

argument of type "double (*)[3]" is incompatible with parameter of type "const double (*)[3]" #598

@dmt4

Description

@dmt4

Hi, I've just tried compiling the 2.6 release with nvc++ v25.5 and get a barrage (only 615) of these warnings.

One of the examples is

void mat_multiply_matrix_i3(int m[3][3], int const a[3][3], int const b[3][3]) {
being called from
mat_multiply_matrix_i3(rot, proper_rot, rot);

Optimiser assuming no argument aliasing (or at least not one between const and non-const args) may eliminate the copy step at the end of the function and places the output arg straight in the loop, causing 'interesting' results.

One solution is to simply not do this and have a copy in the calling routine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions