Roland Mainz
2013-08-17 15:50:41 UTC
Hi!
----
I'm getting the following "clang" build error with ast-ksh.2013-08-14
on SuSE 12.3/AMD64/64bit Linux:
-- snip --
+ cc -D_BLD_DLL -fPIC -D_BLD_ast '-DSHOPT_CMDLIB_BLTIN=0'
'-DSH_CMDLIB_DIR="/usr/ast/bin"'
'-DSHOPT_CMDLIB_HDR="/home/test001/work/ast_ksh_20130814/build_clang/tmp_gnulinux_builtin_header.h"'
-DSHOPT_SYSRC '-D_map_libc=1' -g -ggdb -fno-builtin -fstrict-aliasing
-Wstrict-aliasing -fstrict-overflow -Wstrict-overflow -Wsequence-point
-Wno-parentheses -Wno-unused -Wno-trigraphs -Waddress
-Wmissing-variable-declarations -I.
-I/home/test001/work/ast_ksh_20130814/build_clang/src/lib/libast
-Icomp -I/home/test001/work/ast_ksh_20130814/build_clang/src/lib/libast/comp
-Iinclude -I/home/test001/work/ast_ksh_20130814/build_clang/src/lib/libast/include
-Istd -I/home/test001/work/ast_ksh_20130814/build_clang/src/lib/libast/std
-D_PACKAGE_ast -c
/home/test001/work/ast_ksh_20130814/build_clang/src/lib/libast/misc/signal.c
/home/test001/work/ast_ksh_20130814/build_clang/src/lib/libast/misc/signal.c:75:1:
error: conflicting types for '_ast_signal'
signal(int sig, Sig_handler_t fun)
^
./ast_map.h:293:22: note: expanded from macro 'signal'
#define signal _ast_signal
^
/usr/include/signal.h:102:23: note: previous declaration is here
extern __sighandler_t signal (int __sig, __sighandler_t __handler)
^
./ast_map.h:293:22: note: expanded from macro 'signal'
#define signal _ast_signal
^
/home/test001/work/ast_ksh_20130814/build_clang/src/lib/libast/misc/signal.c:90:17:
warning: comparison of distinct pointer types ('Sig_handler_t' (aka
'void (*)(int, ...)') and '__sighandler_t' (aka 'void (*)(int)'))
[-Wcompare-distinct-pointer-types]
unblock = fun == SIG_DFL;
~~~ ^ ~~~~~~~
/home/test001/work/ast_ksh_20130814/build_clang/src/lib/libast/misc/signal.c:96:16:
warning: incompatible pointer types assigning to '__sighandler_t' (aka
'void (*)(int)') from 'Sig_handler_t' (aka 'void (*)(int, ...)')
[-Wincompatible-pointer-types]
na.sa_handler = fun;
^ ~~~
/home/test001/work/ast_ksh_20130814/build_clang/src/lib/libast/misc/signal.c:129:9:
warning: incompatible pointer types returning '__sighandler_t' (aka
'void (*)(int)') from a function with result type 'Sig_handler_t' (aka
'void (*)(int, ...)') [-Wincompatible-pointer-types]
return oa.sa_handler;
^~~~~~~~~~~~~
3 warnings and 1 error generated.
mamake [lib/libast]: *** exit code 1 making signal.o
-- snip --
Erm... Glenn... any idea how to fix that ? This happens for 'map-libc'
builds with "-Wmissing-variable-declarations" enabled and is the
bane&&curse when testing with "clang" ...
----
Bye,
Roland
----
I'm getting the following "clang" build error with ast-ksh.2013-08-14
on SuSE 12.3/AMD64/64bit Linux:
-- snip --
+ cc -D_BLD_DLL -fPIC -D_BLD_ast '-DSHOPT_CMDLIB_BLTIN=0'
'-DSH_CMDLIB_DIR="/usr/ast/bin"'
'-DSHOPT_CMDLIB_HDR="/home/test001/work/ast_ksh_20130814/build_clang/tmp_gnulinux_builtin_header.h"'
-DSHOPT_SYSRC '-D_map_libc=1' -g -ggdb -fno-builtin -fstrict-aliasing
-Wstrict-aliasing -fstrict-overflow -Wstrict-overflow -Wsequence-point
-Wno-parentheses -Wno-unused -Wno-trigraphs -Waddress
-Wmissing-variable-declarations -I.
-I/home/test001/work/ast_ksh_20130814/build_clang/src/lib/libast
-Icomp -I/home/test001/work/ast_ksh_20130814/build_clang/src/lib/libast/comp
-Iinclude -I/home/test001/work/ast_ksh_20130814/build_clang/src/lib/libast/include
-Istd -I/home/test001/work/ast_ksh_20130814/build_clang/src/lib/libast/std
-D_PACKAGE_ast -c
/home/test001/work/ast_ksh_20130814/build_clang/src/lib/libast/misc/signal.c
/home/test001/work/ast_ksh_20130814/build_clang/src/lib/libast/misc/signal.c:75:1:
error: conflicting types for '_ast_signal'
signal(int sig, Sig_handler_t fun)
^
./ast_map.h:293:22: note: expanded from macro 'signal'
#define signal _ast_signal
^
/usr/include/signal.h:102:23: note: previous declaration is here
extern __sighandler_t signal (int __sig, __sighandler_t __handler)
^
./ast_map.h:293:22: note: expanded from macro 'signal'
#define signal _ast_signal
^
/home/test001/work/ast_ksh_20130814/build_clang/src/lib/libast/misc/signal.c:90:17:
warning: comparison of distinct pointer types ('Sig_handler_t' (aka
'void (*)(int, ...)') and '__sighandler_t' (aka 'void (*)(int)'))
[-Wcompare-distinct-pointer-types]
unblock = fun == SIG_DFL;
~~~ ^ ~~~~~~~
/home/test001/work/ast_ksh_20130814/build_clang/src/lib/libast/misc/signal.c:96:16:
warning: incompatible pointer types assigning to '__sighandler_t' (aka
'void (*)(int)') from 'Sig_handler_t' (aka 'void (*)(int, ...)')
[-Wincompatible-pointer-types]
na.sa_handler = fun;
^ ~~~
/home/test001/work/ast_ksh_20130814/build_clang/src/lib/libast/misc/signal.c:129:9:
warning: incompatible pointer types returning '__sighandler_t' (aka
'void (*)(int)') from a function with result type 'Sig_handler_t' (aka
'void (*)(int, ...)') [-Wincompatible-pointer-types]
return oa.sa_handler;
^~~~~~~~~~~~~
3 warnings and 1 error generated.
mamake [lib/libast]: *** exit code 1 making signal.o
-- snip --
Erm... Glenn... any idea how to fix that ? This happens for 'map-libc'
builds with "-Wmissing-variable-declarations" enabled and is the
bane&&curse when testing with "clang" ...
----
Bye,
Roland
--
__ . . __
(o.\ \/ /.o) roland.mainz at nrubsig.org
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 3992797
(;O/ \/ \O;)
__ . . __
(o.\ \/ /.o) roland.mainz at nrubsig.org
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 3992797
(;O/ \/ \O;)