From owner-freebsd-toolchain@FreeBSD.ORG Mon Apr 15 11:06:52 2013 Return-Path: Delivered-To: freebsd-toolchain@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B05529B7 for ; Mon, 15 Apr 2013 11:06:52 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 88A2B7B8 for ; Mon, 15 Apr 2013 11:06:52 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r3FB6qna015279 for ; Mon, 15 Apr 2013 11:06:52 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r3FB6qRA015277 for freebsd-toolchain@FreeBSD.org; Mon, 15 Apr 2013 11:06:52 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 15 Apr 2013 11:06:52 GMT Message-Id: <201304151106.r3FB6qRA015277@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-toolchain@FreeBSD.org Subject: Current problem reports assigned to freebsd-toolchain@FreeBSD.org X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Apr 2013 11:06:52 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o bin/175930 toolchain [headers] clang does not define __STDC_ISO_10646__, de 1 problem total. From owner-freebsd-toolchain@FreeBSD.ORG Mon Apr 15 19:26:38 2013 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 469A98F2 for ; Mon, 15 Apr 2013 19:26:38 +0000 (UTC) (envelope-from edschouten@gmail.com) Received: from mail-vb0-x22b.google.com (mail-vb0-x22b.google.com [IPv6:2607:f8b0:400c:c02::22b]) by mx1.freebsd.org (Postfix) with ESMTP id 0E6CE15C3 for ; Mon, 15 Apr 2013 19:26:37 +0000 (UTC) Received: by mail-vb0-f43.google.com with SMTP id q12so4048021vbe.16 for ; Mon, 15 Apr 2013 12:26:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:date:x-google-sender-auth:message-id :subject:from:to:content-type; bh=0FrZMd1MdpYH6WOEAM1CGo5QYFl0OYVfhnRJpmt5wGk=; b=sBkCcNEipJrcqifZGXFgbcLyDTDOrmolVlcbHtdhtDEk17OD8rbQODxA9PPjEpa6rA ED3qn0phRSJ8sHhzWIY7ltQRQ3irSuj7pgUfde3i/ki0yhc0JF4R1si31RBDcRzehnjm oKDrrDJJlipvZoaE+INBvKmrsEMRr2iZbSBSEL/X8JebUTmX11xZyQQ4JOxUtDyV9Utj 2HIXUcLKVZCqEZ2fbImcAm2Y23zDMF/YjzLWBIt/5kiZn8vqgQvR+SHsFc7o0sggliPf oHI54JyzRtfnCKVWTniVV6X8KIbZ6L1iIDctFGrvsOjhFzb3U7pOcY2CT7YSeVPcXvXB wynQ== MIME-Version: 1.0 X-Received: by 10.52.65.113 with SMTP id w17mr5291361vds.79.1366053680986; Mon, 15 Apr 2013 12:21:20 -0700 (PDT) Sender: edschouten@gmail.com Received: by 10.220.102.6 with HTTP; Mon, 15 Apr 2013 12:21:20 -0700 (PDT) Date: Mon, 15 Apr 2013 21:21:20 +0200 X-Google-Sender-Auth: VKcG2JqV-pXvdASpVtua0Sl7zhk Message-ID: Subject: [Patch] Add -Wmissing-variable-declarations to WARNS=6 From: Ed Schouten To: freebsd-toolchain@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Apr 2013 19:26:38 -0000 Hi folks, Quite some time ago I spent some time hacking on Clang to add support for a new warning flag, called -Wmissing-variable-declarations. To summarize, it lets the compiler trigger a warning if you write the following piece of code (at the global scope): int i; Huh? Why should it do that? Well, people should typically write the following instead: extern int i; ... int i; Or: static int i; Essentially, it is the same as -Wmissing-prototypes, but then for global variables. By enabling this compiler warning, I managed to improve our code quality a bit: - In some cases binaries became smaller as I added static keywords, as either the number of symbols in the header decreased, or the compiler could do some magic optimisation that was otherwise not possible. Also in many cases, I observed that the compiler can now more accurately derive which variables are not written to, meaning they are stored in read-only sections. - In some cases I found truly harmful bugs. For example, multiple C source files in one binary would do a tentative definition of a variable under the same name, which got shared, even though they had to remain separated. - In other cases I found harmless bugs. For example: enum { FOO, BAR } baz; Where the following was meant: enum baz { FOO, BAR }; Or simply: enum { FOO, BAR }; Because I think it's a nice compiler warning flag, I am thinking about adding it to WARNS=6. Patch: http://80386.nl/pub/wmissing-variable-declarations.txt I thought I'd send this email, because I've got a couple of questions: - Essentially any piece of code that uses Yacc/Lex won't build because of this flag, simply because the C code that's printed out by these tools is too horrible and cannot easily be fixed without changing the consumers as well. To work around this, I've added a NO_WMISSING_VARIABLE_DECLARATIONS=. Any objections? - Is the logic I added to share/mk/bsd.sys.mk all right? Do I check the right conditions? - Is it okay if I push in the changes to the CDDL code? I already sent a patch for this to the Illumos folks, but so far I haven't received a reply yet: https://www.illumos.org/issues/3700 Enabling this for the kernel would be awesome, but unfortunately this would be pretty hard. We quite often have that we create non-static global variables that are used elsewhere (e.g. through symbol lookups or by placing them in different sections). Cheers, -- Ed Schouten From owner-freebsd-toolchain@FreeBSD.ORG Sat Apr 20 06:17:52 2013 Return-Path: Delivered-To: toolchain@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 56ADACDF; Sat, 20 Apr 2013 06:17:52 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-ie0-x22a.google.com (mail-ie0-x22a.google.com [IPv6:2607:f8b0:4001:c03::22a]) by mx1.freebsd.org (Postfix) with ESMTP id 25B23FDF; Sat, 20 Apr 2013 06:17:52 +0000 (UTC) Received: by mail-ie0-f170.google.com with SMTP id at1so1876241iec.15 for ; Fri, 19 Apr 2013 23:17:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to:cc :content-type; bh=lQuaF3VXwvFpnUxjQboljE/FPXqKsFHj54VyNyxlu9c=; b=aaktUWa6cE40Ri1m5cU2YoRat3w37bvDBHuYC/npwCkC+DzokOmV3bJr1PXNftu7vs bG/UUUyV026SM0Z4Hjyeul6eFUvaFd8q1SQX53vvuAq2gNn1NCviZadoPaLrdEWgrpCZ 6b7c7INGGnyR+ap7yPdA3jXGo79CTwYiPSV4uXKXEMB+rJ3gixuaJv23IkvM1EDW7nxJ hnC2aBbHt1YNVYqUOfMglJsTg7ICMKtI3MUmMBut1cXeOScss/huB74xH4VAxbDIFUnY YgDr1/RuGJxGhi+BlAch2VfdJTJj0arjFoqq2Iuyoal0YaP4f9w7291lkDkghIBkkWkF yz8Q== MIME-Version: 1.0 X-Received: by 10.50.197.170 with SMTP id iv10mr16898928igc.62.1366438670372; Fri, 19 Apr 2013 23:17:50 -0700 (PDT) Received: by 10.64.86.70 with HTTP; Fri, 19 Apr 2013 23:17:50 -0700 (PDT) Date: Fri, 19 Apr 2013 23:17:50 -0700 Message-ID: Subject: [RFC] [Optionally] build tests with buildworld From: Garrett Cooper To: arch@FreeBSD.org, toolchain@FreeBSD.org Content-Type: multipart/mixed; boundary=bcaec5396b508e130904dac4cb6c Cc: "Simon J. Gerraty" X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Apr 2013 06:17:52 -0000 --bcaec5396b508e130904dac4cb6c Content-Type: text/plain; charset=ISO-8859-1 Hi arch@ and toolchain@, One of the items that I'm proposing be added to Makefile.inc1 in order to make building and installing tests on CURRENT (ATF and otherwise) is a build knob called TESTS_WITH_WORLD (the name can be modified), which allows me to build and install various tests on my git branch like the example ATF tests I produced, pjdfstest, some of the prove tests from tools/regression, etc (there are other outstanding changes, but this was the key one that I need feedback on just to be safe). The effective change is attached (Gmail will no doubt mangle it, so please let me know if you want another copy). I made the change to Makefile.inc1 in order to ensure that the change was self-contained and because it was the simplest, cleanest way to do things without introducing a lot of unwanted complexity. I'm asking for feedback on the following items: 1. Does the change make functional sense? If not, why? 2. Do the semantics (variable names, whether or not they're defined) need to be modified to match MK_* semantics or be made more consistent in any particular way? If so, why? 3. Will anyone have serious heartburn (already have a similar change implemented, think it's done in a backwards manner) if this change is implemented? If so, why? Thanks! -Garrett PS Please CC me on all replies as I'm not subscribed to the list. --bcaec5396b508e130904dac4cb6c Content-Type: application/octet-stream; name="TESTS_WITH_WORLD.patch" Content-Disposition: attachment; filename="TESTS_WITH_WORLD.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hfqea49r0 SW5kZXg6IE1ha2VmaWxlLmluYzEKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gTWFrZWZpbGUuaW5jMQkocmV2aXNp b24gMjQ5NjY1KQorKysgTWFrZWZpbG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