Commit 1b4b1fc7 by Tom de Vries Committed by Tom de Vries

Document dg-line directive

2017-05-23  Tom de Vries  <tom@codesourcery.com>

	* doc/sourcebuild.texi (Directives, Verify compiler message): Document
	dg-line directive.

From-SVN: r248376
parent d2db2e6b
2017-05-23 Tom de Vries <tom@codesourcery.com>
* doc/sourcebuild.texi (Directives, Verify compiler message): Document
dg-line directive.
2017-05-23 Jan Hubicka <hubicka@ucw.cz>
* cgraphunit.c (symbol_table::process_new_functions): Update.
......
......@@ -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},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment