Next: , Previous: , Up: Implementation Defined Pragmas   [Contents][Index]


2.169 Pragma Source_Reference

Syntax:

pragma Source_Reference (INTEGER_LITERAL, STRING_LITERAL);

This pragma must appear as the first line of a source file. integer_literal is the logical line number of the line following the pragma line (for use in error messages and debugging information). string_literal is a static string constant that specifies the file name to be used in error messages and debugging information. This is most notably used for the output of gnatchop with the `-r' switch, to make sure that the original unchopped source file is the one referred to.

The second argument must be a string literal, it cannot be a static string expression other than a string literal. This is because its value is needed for error messages issued by all phases of the compiler.