Skip to content

Instantly share code, notes, and snippets.

@imaami
Created April 4, 2024 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save imaami/c3a948d427879296b059441c00c139e0 to your computer and use it in GitHub Desktop.
Save imaami/c3a948d427879296b059441c00c139e0 to your computer and use it in GitHub Desktop.
// Behavior of gcc-14 and clang-19 diverge on this.
// Compile with -std=gnu23.
#include <stdio.h>
int main(void) {
printf("%s\n", _Generic(
(struct{_BitInt(8) x : 2;}){}.x,
_BitInt(2): "gcc", _BitInt(8): "clang"));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment