Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
e211f859
Commit
e211f859
authored
Apr 24, 2009
by
Arnaud Charlet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(pragma Source_File_Name): add missing documentation for the Index
argument. From-SVN: r146723
parent
6db828c3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
2 deletions
+34
-2
gcc/ada/gnat_rm.texi
+34
-2
No files found.
gcc/ada/gnat_rm.texi
View file @
e211f859
...
@@ -4238,11 +4238,13 @@ Syntax:
...
@@ -4238,11 +4238,13 @@ Syntax:
@smallexample @c ada
@smallexample @c ada
pragma Source_File_Name (
pragma Source_File_Name (
[Unit_Name =>] unit_NAME,
[Unit_Name =>] unit_NAME,
Spec_File_Name => STRING_LITERAL);
Spec_File_Name => STRING_LITERAL,
[Index => INTEGER_LITERAL]);
pragma Source_File_Name (
pragma Source_File_Name (
[Unit_Name =>] unit_NAME,
[Unit_Name =>] unit_NAME,
Body_File_Name => STRING_LITERAL);
Body_File_Name => STRING_LITERAL,
[Index => INTEGER_LITERAL]);
@end smallexample
@end smallexample
@noindent
@noindent
...
@@ -4254,6 +4256,36 @@ compilation, or to a single unit, depending on how it is used.
...
@@ -4254,6 +4256,36 @@ compilation, or to a single unit, depending on how it is used.
the second argument is required, and indicates whether this is the file
the second argument is required, and indicates whether this is the file
name for the spec or for the body.
name for the spec or for the body.
The optional Index argument should be used when a file contains multiple
units, and when you do not want to use @code{gnatchop} to separate then
into multiple files (which is the recommended procedure to limit the
number of recompilation that are needed when some sources change).
For instance, if the source file @file{source.ada} contains
@smallexample @c ada
package B is
...
end B;
with B;
procedure A is
begin
..
end A;
@end smallexample
you could use the following configuration pragmas:
@smallexample @c ada
pragma Source_File_Name
(B, Spec_File_Name => "source.ada", Index => 1);
pragma Source_File_Name
(A, Body_File_Name => "source.ada", Index => 2);
@end smallexample
Note that the @code{gnatname} utility can also be used to generate those
configuration pragmas.
Another form of the @code{Source_File_Name} pragma allows
Another form of the @code{Source_File_Name} pragma allows
the specification of patterns defining alternative file naming schemes
the specification of patterns defining alternative file naming schemes
to apply to all files.
to apply to all files.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment