zsh-workers
 help / color / mirror / code / Atom feed
* Undefined behaviour warnings with zsh.git and clang
@ 2015-07-14  8:48 İsmailDönmez
  2015-07-14  9:20 ` Peter Stephenson
  0 siblings, 1 reply; 2+ messages in thread
From: İsmailDönmez @ 2015-07-14  8:48 UTC (permalink / raw)
  To: zsh-workers

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.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-07-14  9:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-14  8:48 Undefined behaviour warnings with zsh.git and clang İsmailDönmez
2015-07-14  9:20 ` Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).