Skip to content

Conversation

@alejandro-colomar
Copy link
Collaborator

@alejandro-colomar alejandro-colomar commented Aug 7, 2025

I tried building with Clang, and got some errors. Let's fix them.


Revisions:

v1b
  • Rebase
$ git rd 
1:  8cff20a9 = 1:  74a47486 lib/attr.h: __has_c_attribute(): Define fallback
2:  b261965a = 2:  fc128011 lib/attr.h: MAYBE_UNUSED: Implement with [[maybe_unused]]
3:  315b415c = 3:  34a8a8b3 lib/attr.h: NORETURN: Implement with [[noreturn]]
4:  07fc73d3 = 4:  7bac4219 lib/attr.h: format_attr(): Use it also with Clang
5:  7495c00d = 5:  eff23254 lib/attr.h: ATTR_ACCESS(): Use it also with Clang
6:  aebde490 = 6:  fafeebdd lib/attr.h: ATTR_ALLOC_SIZE(): Use it also with Clang
7:  64d2a532 = 7:  2e3aea8e lib/attr.h: ATTR_STRING(): Use it also with Clang
8:  a3a0b3ba = 8:  874618ea src/: usage(): Use [[noreturn]]
v1c
  • Rebase
$ git rd 
1:  74a47486 = 1:  237e563e lib/attr.h: __has_c_attribute(): Define fallback
2:  fc128011 = 2:  83338590 lib/attr.h: MAYBE_UNUSED: Implement with [[maybe_unused]]
3:  34a8a8b3 = 3:  66273ea1 lib/attr.h: NORETURN: Implement with [[noreturn]]
4:  7bac4219 = 4:  c4b44bc3 lib/attr.h: format_attr(): Use it also with Clang
5:  eff23254 = 5:  b21a8dfd lib/attr.h: ATTR_ACCESS(): Use it also with Clang
6:  fafeebdd = 6:  a866feb1 lib/attr.h: ATTR_ALLOC_SIZE(): Use it also with Clang
7:  2e3aea8e = 7:  beb5bd96 lib/attr.h: ATTR_STRING(): Use it also with Clang
8:  874618ea = 8:  892a8893 src/: usage(): Use [[noreturn]]
v1d
  • Rebase
$ git rd 
1:  237e563e = 1:  48a50796 lib/attr.h: __has_c_attribute(): Define fallback
2:  83338590 = 2:  23035960 lib/attr.h: MAYBE_UNUSED: Implement with [[maybe_unused]]
3:  66273ea1 = 3:  a9064c71 lib/attr.h: NORETURN: Implement with [[noreturn]]
4:  c4b44bc3 = 4:  23b5248d lib/attr.h: format_attr(): Use it also with Clang
5:  b21a8dfd = 5:  71d3e892 lib/attr.h: ATTR_ACCESS(): Use it also with Clang
6:  a866feb1 = 6:  3686e13a lib/attr.h: ATTR_ALLOC_SIZE(): Use it also with Clang
7:  beb5bd96 = 7:  4505ebf2 lib/attr.h: ATTR_STRING(): Use it also with Clang
8:  892a8893 = 8:  6dfd56f2 src/: usage(): Use [[noreturn]]
v1e
  • Rebase
$ git rd 
1:  48a50796 = 1:  e07d4f01 lib/attr.h: __has_c_attribute(): Define fallback
2:  23035960 = 2:  5e0353c9 lib/attr.h: MAYBE_UNUSED: Implement with [[maybe_unused]]
3:  a9064c71 = 3:  f1b8185f lib/attr.h: NORETURN: Implement with [[noreturn]]
4:  23b5248d = 4:  37392148 lib/attr.h: format_attr(): Use it also with Clang
5:  71d3e892 = 5:  36091e3a lib/attr.h: ATTR_ACCESS(): Use it also with Clang
6:  3686e13a = 6:  7014c945 lib/attr.h: ATTR_ALLOC_SIZE(): Use it also with Clang
7:  4505ebf2 = 7:  f56cd223 lib/attr.h: ATTR_STRING(): Use it also with Clang
8:  6dfd56f2 = 8:  1fa985f6 src/: usage(): Use [[noreturn]]
v1f
  • Rebase
$ git rd 
1:  e07d4f01 < -:  -------- lib/attr.h: __has_c_attribute(): Define fallback
2:  5e0353c9 = 1:  04cb0a90 lib/attr.h: MAYBE_UNUSED: Implement with [[maybe_unused]]
3:  f1b8185f = 2:  18e567e9 lib/attr.h: NORETURN: Implement with [[noreturn]]
4:  37392148 = 3:  46dd7a4d lib/attr.h: format_attr(): Use it also with Clang
5:  36091e3a = 4:  52cdacd2 lib/attr.h: ATTR_ACCESS(): Use it also with Clang
6:  7014c945 = 5:  0efa6c1d lib/attr.h: ATTR_ALLOC_SIZE(): Use it also with Clang
7:  f56cd223 = 6:  589c9745 lib/attr.h: ATTR_STRING(): Use it also with Clang
8:  1fa985f6 = 7:  aca6845d src/: usage(): Use [[noreturn]]
v1g
  • Rebase
$ git rd 
1:  04cb0a90 = 1:  d88bc430 lib/attr.h: MAYBE_UNUSED: Implement with [[maybe_unused]]
2:  18e567e9 = 2:  96d062a2 lib/attr.h: NORETURN: Implement with [[noreturn]]
3:  46dd7a4d = 3:  17a426bd lib/attr.h: format_attr(): Use it also with Clang
4:  52cdacd2 = 4:  328f92d3 lib/attr.h: ATTR_ACCESS(): Use it also with Clang
5:  0efa6c1d = 5:  1226837a lib/attr.h: ATTR_ALLOC_SIZE(): Use it also with Clang
6:  589c9745 = 6:  59948920 lib/attr.h: ATTR_STRING(): Use it also with Clang
7:  aca6845d = 7:  4d5bf6be src/: usage(): Use [[noreturn]]

This is a C23 standard attribute with the same semantics.

Signed-off-by: Alejandro Colomar <[email protected]>
This is a C23 standard attribute with the same semantics.

Signed-off-by: Alejandro Colomar <[email protected]>
This silences false-positive diagnostics in Clang.

Signed-off-by: Alejandro Colomar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Simpler A good issue for a new beginner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant