From: İsmailDönmez <ismail@donmez.ws>
To: zsh-workers@zsh.org
Subject: Undefined behaviour warnings with zsh.git and clang
Date: Tue, 14 Jul 2015 08:48:17 +0000 (UTC) [thread overview]
Message-ID: <loom.20150714T104717-624@post.gmane.org> (raw)
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.
next reply other threads:[~2015-07-14 8:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-14 8:48 İsmailDönmez [this message]
2015-07-14 9:20 ` Peter Stephenson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=loom.20150714T104717-624@post.gmane.org \
--to=ismail@donmez.ws \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).