From owner-freebsd-toolchain@freebsd.org Sat Feb 20 01:15:40 2016 Return-Path: Delivered-To: freebsd-toolchain@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 627D9AAD89A for ; Sat, 20 Feb 2016 01:15:40 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "troutmask", Issuer "troutmask" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 493FF88E for ; Sat, 20 Feb 2016 01:15:40 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.15.2/8.15.2) with ESMTPS id u1K0voU7084424 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Fri, 19 Feb 2016 16:57:50 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.15.2/8.15.2/Submit) id u1K0voKN084423 for freebsd-toolchain@freebsd.org; Fri, 19 Feb 2016 16:57:50 -0800 (PST) (envelope-from sgk) Date: Fri, 19 Feb 2016 16:57:50 -0800 From: Steve Kargl To: freebsd-toolchain@freebsd.org Subject: confusing messages from clang Message-ID: <20160220005749.GA84382@troutmask.apl.washington.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.20 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 Feb 2016 01:15:40 -0000 If anyone is interesting fixing FreeBSD's C compiler, it would be appreciated. % cat foo.c #include #include void foo(int i) { if (i < 0) goto whoops; if (i == 0) printf("foo\n"); if (i > 0) goto corrupt; return; whoops: printf("whoops\n"); return corrupt: printf("corrupt\n"); } % cc -c foo.c foo.c:21:1: error: use of undeclared identifier 'corrupt'; did you mean 'crypt'? corrupt: ^~~~~~~ crypt /usr/include/unistd.h:450:7: note: 'crypt' declared here char *crypt(const char *, const char *); ^ foo.c:21:8: error: expected ';' after return statement corrupt: ^ ; foo.c:14:12: error: use of undeclared label 'corrupt' goto corrupt; ^ 3 errors generated. No, I did not mean crypt. 'corrupt' is a defined label. The missing semicolon occurs in line 19, but the line is not properly identified in error output. -- Steve