Skip to content

Dereferencing void pointer shouldn't be rejected #112121

@Halalaluyafail3

Description

@Halalaluyafail3

Clang rejects dereferencing a void pointer, for example:

*(void*)0;

I don't see any constraints that this would violate so this should be OK I think, at least as long as the expression goes unevaluated. GCC accepts this (with a warning by default), MSVC rejects it but even in contexts that should make sense like &*(void*)0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:frontendLanguage frontend issues, e.g. anything involving "Sema"questionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions