Skip to content

c_import: a local anonymous union variable in an inline body is translated as an opaque type (SDL_Swap32's union { float f; Uint32 ui32 } swapper) #1878

Closed

Description

@ehartford

Found verifying #1872 (both platforms). SDL.h's SDL_SwapFloat declares a local union { float f; Uint32 ui32; } swapper; inside a static inline body; the translation makes the union opaque, so the body fails with 4 × opaque-union field access and 1 × "cannot create value of opaque type". Expected: a local anonymous union with scalar members is a With union/struct with those fields (§16.1), or a loud omission of the function naming the construct.

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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions