Skip to content

static float f = 0.f / 0.f; cannot be compiled #161806

@tydeman

Description

@tydeman

This program will not compile.

int main(void){
  if(1){
    static float f = 0.f / 0.f;/* cannot compile this constant l-value expression yet */
  }
  return 0;
}

I believe that C99 introduced this feature along with IEEE-754 floating-point.
It is one way to create a NAN.

Metadata

Metadata

Assignees

No one assigned

    Labels

    c23clang:frontendLanguage frontend issues, e.g. anything involving "Sema"confirmedVerified by a second partyregression:19Regression in 19 release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions