From owner-freebsd-current@freebsd.org Wed Aug 31 00:54:59 2016 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2D052BBC5B1 for ; Wed, 31 Aug 2016 00:54:59 +0000 (UTC) (envelope-from mmacy@nextbsd.org) Received: from sender163-mail.zoho.com (sender163-mail.zoho.com [74.201.84.163]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 07D1989E for ; Wed, 31 Aug 2016 00:54:58 +0000 (UTC) (envelope-from mmacy@nextbsd.org) Received: from mail.zoho.com by mx.zohomail.com with SMTP id 1472604893880823.1589333133608; Tue, 30 Aug 2016 17:54:53 -0700 (PDT) Date: Tue, 30 Aug 2016 17:54:53 -0700 From: Matthew Macy To: "freebsd-current@freebsd.org" Message-ID: <156de1772b3.b4084534175858.7183446003709026011@nextbsd.org> Subject: warning errors with buildworld with llvm39 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Priority: Medium User-Agent: Zoho Mail X-Mailer: Zoho Mail X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Aug 2016 00:54:59 -0000 I did a buildworld with llvm39. Unsurprisingly I had to pass NO_WERROR= as the llvm has added additional warnings since 3.8. https://gist.github.com/mattmacy/5f0c994b7587a10e3f58e7fd9fc1dd01 The most prevalent seems to be: jemalloc_nstime.c:120:7: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined] #elif JEMALLOC_CLOCK_GETTIME ^ /mnt/storage/mmacy/devel/drm-next-merge/lib/libc/../../contrib/jemalloc/include/jemalloc/internal/nstime.h:4:32: note: expanded from macro 'JEMALLOC_CLOCK_GETTIME' #define JEMALLOC_CLOCK_GETTIME defined(_POSIX_MONOTONIC_CLOCK) \ ^ 1 warning generated. jemalloc_nstime.c:120:7: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined] #elif JEMALLOC_CLOCK_GETTIME ^ /mnt/storage/mmacy/devel/drm-next-merge/lib/libc/../../contrib/jemalloc/include/jemalloc/internal/nstime.h:4:32: note: expanded from macro 'JEMALLOC_CLOCK_GETTIME' #define JEMALLOC_CLOCK_GETTIME defined(_POSIX_MONOTONIC_CLOCK) \ It makes sense that a define in a define has undefined behavior because it requires a second evaluation by the C preprocessor. I think constant-conversion warnings are also new: /mnt/storage/mmacy/devel/drm-next-merge/lib/ncurses/ncursesw/../../../contrib/ncurses/ncurses/tinfo/lib_baudrate.c:121:5: warning: implicit conversion from 'int' to 'short' changes value from 38400 to -27136 [-Wconstant-conversion] DATA(38400), ^~~~~~~~~~~ /mnt/storage/mmacy/devel/drm-next-merge/lib/ncurses/ncursesw/../../../contrib/ncurses/ncurses/tinfo/lib_baudrate.c:97:24: note: expanded from macro 'DATA' #define DATA(number) { B##number, number } ~ ^~~~~~~~~ :30:1: note: expanded from here B38400 ^~~~~~ /home/mmacy/devel/build/mnt/storage/mmacy/devel/drm-next-merge/tmp/usr/include/sys/_termios.h:193:16: note: expanded from macro 'B38400' #define B38400 38400 ^~~~~ /mnt/storage/mmacy/devel/drm-next-merge/lib/ncurses/ncursesw/../../../contrib/ncurses/ncurses/tinfo/lib_baudrate.c:126:5: warning: implicit conversion from 'int' to 'short' changes value from 57600 to -7936 [-Wconstant-conversion] DATA(57600), ^~~~~~~~~~~ /mnt/storage/mmacy/devel/drm-next-merge/lib/ncurses/ncursesw/../../../contrib/ncurses/ncurses/tinfo/lib_baudrate.c:97:24: note: expanded from macro 'DATA' #define DATA(number) { B##number, number } ~ ^~~~~~~~~ :31:1: note: expanded from here B57600