| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
Add comments and indentation.
Handle XL C a bit more like the other compilers. Make the first test be
"is this someting that's not XL C", as is the case for other compilers;
that test is done as "are both __xlC__ and __ibmxl__ undefined". If
either of them are defined, use __ibmxl_version__ if __ibmxl__ is
defined, and use __xlC__ otherwise.
(cherry picked from commit 1912902e96bcb1729d58225541c5e5b75345886a)
|
|
|
|
|
|
|
|
|
|
| |
XL C full version consists of 4 numbers. Introduce an additional macro
for testing the two least significant numbers. Using the fix lists
published by IBM, tell XL C 16.1 that has the bug interpreting the
__format__ attribute of a function pointer from XL C 16.1 that has not.
Rejig the #if block to make it easier to follow.
(cherry picked from commit 66e1377aa133bf83ecf92679a53f7d0c54efc445)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
XL C 16.1.1 Community Edition for Linux generated three warnings for
every file:
In file included from ./tcpdump.c:155:
./netdissect.h:254:8: warning: 1540-2990 The attribute
"__attribute__((format(printf, 2, 3)))" is not supported. The
attribute is ignored.
PRINTFLIKE_FUNCPTR(2, 3);
^
./netdissect.h:259:10: warning: 1540-2990 The attribute
" __attribute__((format(printf, 3, 4)))" is not supported.
The attribute is ignored.
PRINTFLIKE_FUNCPTR(3, 4);
^
./netdissect.h:263:9: warning: 1540-2990 The attribute
" __attribute__((format(printf, 2, 3)))" is not supported. The
attribute is ignored.
PRINTFLIKE_FUNCPTR(2, 3);
^
As it turns out, this is a bug in the compiler. In compiler-tests.h
update ND_IS_AT_LEAST_XL_C_VERSION() to tell newer XL C versions. In
funcattrs.h exempt XL C 16.1 from PRINTFLIKE_FUNCPTR().
In the course of preparing these changes notice that XL C uses the Clang
block in diag-control.h (XL C mimics both Clang and GCC to some extent),
although the behaviour is different between the two compilers. Add a new
block for XL C there.
In build_common.sh add more comments to explain XL C quirks and detect
XL C for Linux too so it receives the right CFLAGS. Update CHANGES to
mention this and earlier improvements.
(cherry picked from commit c3c949e98e9d046a2017a122ba869c89329acdd1)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's explicitly cheating in some places; just cast away the warnings.
Add a Clang version testing macro to compiler-tests.h.
Move the diagnostic control #defines from netdissect-stdinc.h to
diag-control.h, libpcap-style, so that they can be used by code that
doesn't use (or need) netdissect-stdinc.h. This also means that we can
limit the inclusion of diag-control.h, and the definition of those
Do them more libpcap-style, with separate DIAG_OFF/DIAG_ON pairs for
particular issues, rather than having DIAG_OFF() and DIAG_ON() macros
that take -W option names as arguments; that way, if we need to define
them for compilers that don't have the GCC/Clang syntax for those
pragmas, e.g. MSVC, we can do so.
(cherry picked from commit 39f09d68ce7ebe9e229c9bf5209bfc30a8f51064)
|
|
|
|
| |
[skip ci]
|
|
Instead, use compiler test macros to check whether *particular*
attributes are supported, and set various #defines appropriately, in
header files.
Rename the UNALIGNED structure attribute to ND_UNALIGNED, and ask
whether we still need it.
|