Date: Sat, 20 Feb 2016 08:33:16 +0100 From: Alex Denisov <1101.debian@gmail.com> To: Steve Kargl <sgk@troutmask.apl.washington.edu> Cc: freebsd-toolchain@freebsd.org Subject: Re: confusing messages from clang Message-ID: <FAEB3132-FABB-42B7-B64B-32810931E9B8@gmail.com> In-Reply-To: <20160220005749.GA84382@troutmask.apl.washington.edu> References: <20160220005749.GA84382@troutmask.apl.washington.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
--Apple-Mail=_A0F02BAB-2151-4DAD-8F6E-9CAD82040A7C Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi Steve, I=E2=80=99ve submitted the bug to LLVM=E2=80=99s bugzilla: = https://llvm.org/bugs/show_bug.cgi?id=3D26678 Also, it looks like OS agnostic. At least I see the same behaviour on = OSX as well. -- AlexDenisov Software Engineer, http://lowlevelbits.org > On 20 Feb 2016, at 01:57, Steve Kargl = <sgk@troutmask.apl.washington.edu> wrote: >=20 > If anyone is interesting fixing FreeBSD's C compiler, it > would be appreciated. >=20 > % cat foo.c > #include <stdio.h> > #include <unistd.h> >=20 > void > foo(int i) > { > if (i < 0) > goto whoops; >=20 > if (i =3D=3D 0) > printf("foo\n"); >=20 > if (i > 0) > goto corrupt; > return; >=20 > whoops: > printf("whoops\n"); > return >=20 > corrupt: > printf("corrupt\n"); > } >=20 > % 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. >=20 >=20 > 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. >=20 > -- > Steve > _______________________________________________ > freebsd-toolchain@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain > To unsubscribe, send any mail to = "freebsd-toolchain-unsubscribe@freebsd.org" --Apple-Mail=_A0F02BAB-2151-4DAD-8F6E-9CAD82040A7C Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJWyBa9AAoJEKnZX2FYSnX6yTUIALuJHlpIRBn5vIAnP4dWI0Nz UqrMDW5n9ahmC6NGtyI6398B4T/xmHjiU6IZnVLixHn9OT5VKgp4uM0SmOYyzV8X ay0Ohh1+53IvBJQ7jQowxHvXvyNH8UVtITObIRu2fi2FwjpzlpSFE/DGuTMmq5yO TE+VQd/BPyOtPw85jq4ydx2lzkH8frw4yg0Egta7hZ9SbfHcGY4VgliI2Q8c2jfI nj77DyOqZymF3w9Wzdz/VCVLPgB1qj8cqgxQSZxwO1n7ajx0tVeZ7J+jzGqEwwOU cs1wr4f4rquBnvO7yMASfRhaER45QByYHhfyiCd6jvtYRriNeK2B+e+tIUODE0c= =voh+ -----END PGP SIGNATURE----- --Apple-Mail=_A0F02BAB-2151-4DAD-8F6E-9CAD82040A7C--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?FAEB3132-FABB-42B7-B64B-32810931E9B8>