Skip to content

problems with sizeof(T) in preprocessor #if condition #795

Description

@pdhahn

Things like

#if sizeof(unsigned long) == sizeof(int)

in an OKL file cause an error in translation

../../testing/test1.okl:123:12: Error: Unable to form an expression
#if sizeof(unsigned long) == sizeof(int)

On the other hand, things like

#if sizeof(short) < sizeof(int)

seem to pass translation OK, yet do not work properly (are not evaluated correctly).

I am reporting this for libocca commit 65efd39. My platform is Linux Mint 21 with g++ 11.4.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions