aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch3.adb
diff options
context:
space:
mode:
authorPiotr Trojanek <trojanek@adacore.com>2023-02-20 14:01:36 +0100
committerMarc Poulhiès <poulhies@adacore.com>2023-05-23 09:59:05 +0200
commit18ed1bc59391acdad7e80750239b536b3e371d00 (patch)
tree4fb0e6d43b18ca5af13fe4e5d3a9cf3bf9c82058 /gcc/ada/sem_ch3.adb
parent65d2481a4f90f9f2af8b636105d934b2cefa1009 (diff)
downloadgcc-18ed1bc59391acdad7e80750239b536b3e371d00.zip
gcc-18ed1bc59391acdad7e80750239b536b3e371d00.tar.gz
gcc-18ed1bc59391acdad7e80750239b536b3e371d00.tar.bz2
ada: Turn assertions into defensive code in error locations
We pretty-print numeric literals that do not come from source by relying on their Sloc. This generally works well, but sporadically the Sloc is set wrongly. We might want to trace and fix such occurrences, but for now it is simpler to replace an otherwise reasonable assertions with defensive code. gcc/ada/ * errout.adb (Last_Sloc): Refactor a heavily repeated "S := S + 1" statement into a subprogram; replace assertions with defensive code; fix few more off-by-one errors.
Diffstat (limited to 'gcc/ada/sem_ch3.adb')
0 files changed, 0 insertions, 0 deletions