You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SunOS unstable10s 5.10 Generic_150400-17 sun4v sparc SUNW,SPARC-Enterprise-T5220
cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
I was making a seemingly quick test of the current master branch, and it turned out the build matrix fails because of warnings, for example:
"./gencode.c", line 482: function "bpf_error" marked as not returning, might return (E_FUNC_NO_RET_RET)
"optimize.c", line 2409: function "opt_error" marked as not returning, might return (E_FUNC_NO_RET_RET)
"optimize.c", line 2915: function "conv_error" marked as not returning, might return (E_FUNC_NO_RET_RET)
"./can_set_rfmon_test.c", line 95: function "error" marked as not returning, might return (E_FUNC_NO_RET_RET)
At first I tried adding a pair of diagnostic control macros for E_FUNC_NO_RET_RET, but then realised that pretty much every PCAP_NORETURN function needed it. Then I considered disabling the warning for the particular compiler, but that did not seem to be a good idea. Then I tried #define PCAP_UNREACHABLE while(1); and #define PCAP_UNREACHABLE abort(); for Sun C, but neither had any effect. The latter looked entirely strange, so I looked into /usr/include/iso/stdlib_iso.h, which contains roughly the following:
It seemed that __STDC__ was not defined, but adding the following to the source quickly proved that __STDC__ is in fact defined:
#ifdef __STDC__
#error "__STDC__ defined"
#endif
Furthermore, adding -D__STDC__ to a direct invocation of the compiler had no effect, so the problem seems to be that for some reason the compiler disregards the noreturn attribute in standard headers. The same stands for libpcap-1.10 branch, but I do not understand yet how I missed this regression before and after the 1.10.5 build tests.
This is currently breaking build matrix on Solaris 10 using Sun C 5.14, using GCC works as expected.
The text was updated successfully, but these errors were encountered:
I was making a seemingly quick test of the current master branch, and it turned out the build matrix fails because of warnings, for example:
At first I tried adding a pair of diagnostic control macros for
E_FUNC_NO_RET_RET
, but then realised that pretty much everyPCAP_NORETURN
function needed it. Then I considered disabling the warning for the particular compiler, but that did not seem to be a good idea. Then I tried#define PCAP_UNREACHABLE while(1);
and#define PCAP_UNREACHABLE abort();
for Sun C, but neither had any effect. The latter looked entirely strange, so I looked into/usr/include/iso/stdlib_iso.h
, which contains roughly the following:It seemed that
__STDC__
was not defined, but adding the following to the source quickly proved that__STDC__
is in fact defined:Furthermore, adding
-D__STDC__
to a direct invocation of the compiler had no effect, so the problem seems to be that for some reason the compiler disregards the noreturn attribute in standard headers. The same stands for libpcap-1.10 branch, but I do not understand yet how I missed this regression before and after the 1.10.5 build tests.This is currently breaking build matrix on Solaris 10 using Sun C 5.14, using GCC works as expected.
The text was updated successfully, but these errors were encountered: