From: Tom de Vries Date: Tue, 23 May 2017 16:38:31 +0000 (+0000) Subject: Document dg-line directive X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1b4b1fc7cab09c63681cd4deeddcb81a4ee90d1b;p=gcc.git Document dg-line directive 2017-05-23 Tom de Vries * doc/sourcebuild.texi (Directives, Verify compiler message): Document dg-line directive. From-SVN: r248376 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 57849a84e23..a24c3697492 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-05-23 Tom de Vries + + * doc/sourcebuild.texi (Directives, Verify compiler message): Document + dg-line directive. + 2017-05-23 Jan Hubicka * cgraphunit.c (symbol_table::process_new_functions): Update. diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi index ab2f8b62b60..bb5b6b96158 100644 --- a/gcc/doc/sourcebuild.texi +++ b/gcc/doc/sourcebuild.texi @@ -1180,6 +1180,18 @@ associated with the bogus message. It is usually used with @samp{xfail} to indicate that the message is a known problem for a particular set of targets. +@item @{ dg-line @var{linenumvar} @} +This DejaGnu directive sets the variable @var{linenumvar} to the line number of +the source line. The variable @var{linenumvar} can then be used in subsequent +@code{dg-error}, @code{dg-warning}, @code{dg-message} and @code{dg-bogus} +directives. For example: + +@smallexample +int a; /* @{ dg-line first_def_a @} */ +float a; /* @{ dg-error "conflicting types of" @} */ +/* @{ dg-message "previous declaration of" "" @{ target *-*-* @} first_def_a @} */ +@end smallexample + @item @{ dg-excess-errors @var{comment} [@{ target/xfail @var{selector} @}] @} This DejaGnu directive indicates that the test is expected to fail due to compiler messages that are not handled by @samp{dg-error},