Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Undefined behaviour warnings with zsh.git and clang
- X-seq: zsh-workers 35792
- From: İsmailDönmez <ismail@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Undefined behaviour warnings with zsh.git and clang
- Date: Tue, 14 Jul 2015 08:48:17 +0000 (UTC)
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
Hi,
With git master I started to see:
clang -c -I. -I../Src -I../Src -I../Src/Zle -I. -DHAVE_CONFIG_H -O2 -fPIE -
fstack-protector -I/usr/include/ncurses6/ncursesw -I/usr/include/ncurses6 -
o params.o params.c
params.c:1721:18: warning: shifting a negative signed value is undefined [-
Wshift-negative-value]
v->isarr |= SCANPM_ISVAR_AT;
^~~~~~~~~~~~~~~
./zsh.h:1755:32: note: expanded from macro 'SCANPM_ISVAR_AT'
#define SCANPM_ISVAR_AT ((-1)<<15) /* "$foo[@]"-style substitution
~~~~^
params.c:1933:36: warning: shifting a negative signed value is undefined [-
Wshift-negative-value]
v->isarr = flags | (isvarat ? SCANPM_ISVAR_AT : 0);
^~~~~~~~~~~~~~~
./zsh.h:1755:32: note: expanded from macro 'SCANPM_ISVAR_AT'
#define SCANPM_ISVAR_AT ((-1)<<15) /* "$foo[@]"-style substitution
~~~~^
2 warnings generated.
make test is fine but the warning might be worth looking into.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author