Skip to content

The _Generic type selector is probably flat out incorrect #1

Description

@matharman

To be useful, it definitely needs to be smarter. And should not throw -Wpointer-arith when a void * is passed in.

I don't full understand the (arg) + 0 trick, but my assumption is that the arithmetic makes the expression coercible in a way that's useful to the compiler.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions