Are you using C23 attributes?
If you answered yes: Is it directly or using a macro?--
Thiago Adams <[email protected]> wrote:
Are you using C23 attributes?
No and I will avoid it as much as I can.
If you answered yes: Is it directly or using a macro?
Are you using C23 attributes?
If you answered yes: Is it directly or using a macro?
On 9/8/2025 11:43 AM, John McCue wrote:
Thiago Adams <[email protected]> wrote:
Are you using C23 attributes?
No and I will avoid it as much as I can.
If you answered yes: Is it directly or using a macro?
I am using [[nodiscard]].
First I did :
#if __STDC_VERSION__ < 202311L
#define NODISCARD
#else
#define NODISCARD [[nodiscard]]
#endif
NODISCARD int f();
But then I changed to:
#if __STDC_VERSION__ < 202311L
#define _Attr(...)
#else
#define _Attr(...) [[ __VA_ARGS__ ]]
#endif
_Attr(nodiscard) int f();
Sysop: | DaiTengu |
---|---|
Location: | Appleton, WI |
Users: | 1,071 |
Nodes: | 10 (0 / 10) |
Uptime: | 44:00:00 |
Calls: | 13,753 |
Calls today: | 1 |
Files: | 186,983 |
D/L today: |
10,345 files (3,094M bytes) |
Messages: | 2,424,878 |