Skip to content

Commit b4700fa

Browse files
committed
use __GNUC__ for modern builtin
1 parent 48ae282 commit b4700fa

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

test/cfg/gnu.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,11 +214,13 @@ int invalidFunctionArgBool_ctzg(unsigned int a, unsigned int b) {
214214
return __builtin_ctzg(a, a % b == 0);
215215
}
216216

217+
#if __GNUC__ > 14
217218
int ignoredReturnValue_stdc_width(size_t n) {
218219
// cppcheck-suppress ignoredReturnValue
219220
__builtin_stdc_bit_width(n);
220221
return 0;
221222
}
223+
#endif
222224

223225
#if !defined(__APPLE__)
224226
int nullPointer_semtimedop(int semid, struct sembuf *sops, size_t nsops, const struct timespec *timeout)

0 commit comments

Comments
 (0)