Skip to content

Allow in C the more relaxed rules from C++ for assignments with const T *const * #129260

Open
@alejandro-colomar

Description

@alejandro-colomar

Cc: @AaronBallman , @pinskia

GCC bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=17654#c11

There is interest in standardizing this in the committee, and it would be interesting to have Clang do this, to show prior art to the committee. I'm also proposing the same exact change to GCC.

The rules have been proven by C++ to just work, so time has proved that these rules work, unless someone points out any issues that I didn't know about with these rules from C++.

No existing code should break, since it's only removing existing diagnostics, and not adding any new ones.

And const correctness still holds after this relaxation of implicit conversions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    cclang:frontendLanguage frontend issues, e.g. anything involving "Sema"

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions