On 2 Aug 2015, at 17:34, Ian Lepore <i...@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
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to