Skip to content

Fix type of char literals in C mode #576

@robertoraggi

Description

@robertoraggi
#include <stdio.h>

int main() {
  printf("selected %s\n", _Generic('a', char: "char", int: "int"));
}
$ clang -xc x.c && ./a.out
selected int

$ clang -xc++ x.c && ./a.out
selected char

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions