* gnatpp error message
@ 2012-08-01 19:03 awdorrin
2012-08-02 0:35 ` Britt
0 siblings, 1 reply; 3+ messages in thread
From: awdorrin @ 2012-08-01 19:03 UTC (permalink / raw)
I have gnatpp going through my source code and it is encountering a few issues that I haven't been able to figure out yet.
Processing the file 'sccomm_b.ada' I get the following:
[11] sccomm_b.ada
Pre_Operation failed for
Element Debug_Image:
A_PACKAGE_BODY_DECLARATION
located in SC_COMMUNICATION (body, Unit_Id = 4, Context_Id = 1)
text position : 302 : 1 - 5242 : 21
Nodes:
Node : 5486 - N_PACKAGE_BODY
R_Node : 5486 - N_PACKAGE_BODY
Node_Field_1 : 0 - N_EMPTY
Node_Field_2 : 0 - N_EMPTY
Rel_Sloc :-13
obtained from the tree /home/aldorr/lasis/GNAT-SmW7hp/sccexec.adt (Tree_Id = 1)
Exception name: ASIS_UL.COMMON.FATAL_ERROR
Message: gnatpp-source_traversal.adb:152
Line '302' of sccomm_b.ada is (without the quotes):
"package body SC_COMMUNICATION is"
when I look a the corresponding 'sccomm_b.ada.pp' file that is generated, the last line written reads (without the quotes):
"package body"
This code compiles fine and I see no errors in the output, so I'm not sure why gnatpp is failing.
This same error occurs on a few other files in my project.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: gnatpp error message
2012-08-01 19:03 gnatpp error message awdorrin
@ 2012-08-02 0:35 ` Britt
2012-08-02 12:40 ` awdorrin
0 siblings, 1 reply; 3+ messages in thread
From: Britt @ 2012-08-02 0:35 UTC (permalink / raw)
So it works on most other files?
Which gnatpp version, from which distribution?
How are you invoking gnatpp on your source files? Your file name, sccomm_b.ada, doesn't go by the GNAT default filename convention so I assume your have a GNAT project file with a Naming package (section)to specify the filename convention.
Are you invoking gnatpp with the same project file:
e.g.
gnat pretty -P my_project_file.gpr sccomm_b.ada
or are you invoking it via GPS or some other IDE?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: gnatpp error message
2012-08-02 0:35 ` Britt
@ 2012-08-02 12:40 ` awdorrin
0 siblings, 0 replies; 3+ messages in thread
From: awdorrin @ 2012-08-02 12:40 UTC (permalink / raw)
I have a script which has a list of directories containing Ada source code.
The script first uses 'gnatname' to generate a pragma config file, to match up the legacy naming scheme to the package names.
gnatname ${DIRS} -c cfg.adc "*_s.ada" "*_b.ada" "*.ada"
(Where DIRS contains a list of directories with the -d argument)
I then have a loop which goes into each directory and executes the 'gnatpp' command:
gnatpp -M120 -i2 -w -v -dd -gnatec=./cfg.adc ${INCS} *.ada
(Where INCS is a list of directories with the -I argument)
I have 487 Ada source files, 8 files produce the 'Pre_Operation failed' exception.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-08-07 7:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-01 19:03 gnatpp error message awdorrin
2012-08-02 0:35 ` Britt
2012-08-02 12:40 ` awdorrin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox