This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Possibly requires fixing (PRF): GNAT 7.0 not printing actual code samples and column markers when printing errors and warnings


At the current moment, GNAT does not print code samples and column
indicators like GCC/G++/GCCGO/GFORTRAN does. A sample is below (I'm
running as root during this compilation process as I am over SSH and
don't like typing sudo all that much sometimes):
[compilation output from gcc]
/root/gcc/gcc/ada/adaint.c: In function 'void __gnat_killprocesstree(int, int)':
/root/gcc/gcc/ada/adaint.c:3405:58: warning: specified bound 64 equals
the size of the destination [-Wstringop-overflow=]
           strncat (statfile, d->d_name, sizeof(statfile));
                                                          ^
[end output]
Now, take this from GNAT:
/root/gcc/gcc/ada/spark_xrefs.adb: In function 'spark_xrefs.pspark':
/root/gcc/gcc/ada/put_spark_xrefs.adb:174:25: warning: 'Scope' may be
used uninitialized in this function [-Wmaybe-uninitialized]
/root/gcc/gcc/ada/put_spark_xrefs.adb:94:10: note: 'Scope' was declared here
Instead, GNAT should probably print:
/root/gcc/gcc/ada/spark_xrefs.adb: In function 'spark_xrefs.pspark':
/root/gcc/gcc/ada/put_spark_xrefs.adb:174:25: warning: 'Scope' may be
used uninitialized in this function [-Wmaybe-uninitialized]
                        if R.Scope_Num /= Scope then
                        ^
/root/gcc/gcc/ada/put_spark_xrefs.adb:94:10: note: 'Scope' was declared here
It would be even nicer if it printed something like:
/root/gcc/gcc/ada/spark_xrefs.adb: In function 'spark_xrefs.pspark':
/root/gcc/gcc/ada/put_spark_xrefs.adb:174:25: warning: 'Scope' may be
used uninitialized in this function [-Wmaybe-uninitialized]
                        if R.Scope_Num /= Scope then
                        ^
/root/gcc/gcc/ada/put_spark_xrefs.adb:94:10: note: 'Scope' was declared here as:
         Scope       : Nat;
         ^
What do you guys think?
-- 
Signed,
Ethin D. Probst


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]