bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

c.m4: Use __has_attribute to check for attribute availability.


From: Jacek Caban
Subject: c.m4: Use __has_attribute to check for attribute availability.
Date: Fri, 24 Nov 2023 15:17:40 +0100
User-agent: Mozilla Thunderbird

This fixes -Wunused-but-set-variable warnings on clang msvc targets. Commit
a166d5450e3f47587b98f6005f9f5627dbe21a5b fixed those warnings in most cases,
but currently YY_ATTRIBUTE_UNUSED is defined only when __GNUC__ is defined.
When using clang in msvc mode, it's not defined, but __unused__ attribute
is still available.


In my use case, it fixes warnings when building the Wine project with clang as

a cross compiler.

Attachment: 0001-c.m4-Use-__has_attribute-to-check-for-attribute-availa.txt
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]