From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4581 invoked by alias); 14 Jul 2015 08:50:28 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 35792 Received: (qmail 25381 invoked from network); 14 Jul 2015 08:50:25 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.0 X-Injected-Via-Gmane: http://gmane.org/ To: zsh-workers@zsh.org From: =?utf-8?b?xLBzbWFpbA==?= =?utf-8?b?RMO2bm1leg==?= Subject: Undefined behaviour warnings with zsh.git and clang Date: Tue, 14 Jul 2015 08:48:17 +0000 (UTC) Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: sea.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 213.14.100.128 (Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2453.0 Safari/537.36) 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.