svn commit: r286168 - head/sys/net
David Chisnall
theraven at FreeBSD.org
Sun Aug 2 16:41:15 UTC 2015
On 2 Aug 2015, at 17:34, Ian Lepore <ian at freebsd.org> wrote:
>
> It generates a compiler error, so the output is going to contain
> file-and-line like any other compiler error, as well as the message from
> the source code.
It will, of course, vary between compilers, but this is what clang generates:
$ cat static.c
_Static_assert(0, "example assert failed");
$ cc static.c
static.c:1:1: error: static_assert failed "example assert failed"
_Static_assert(0, "example assert failed");
^ ~
1 error generated.
GCC 4.8 and later produce very similar output:
$ gcc-4.8 static.c
static.c:1:1: error: static assertion failed: "example assert failed"
_Static_assert(0, "example assert failed");
^
gcc 4.7 only provides the first line:
$ gcc-4.7 static.c
static.c:1:1: error: static assertion failed: "example assert failed"
David
More information about the svn-src-all
mailing list