]> git.ipfire.org Git - thirdparty/gcc.git/commit
[Ada] Warn for bidirectional characters
authorBob Duff <duff@adacore.com>
Fri, 5 Nov 2021 11:54:33 +0000 (07:54 -0400)
committerPierre-Marie de Rodat <derodat@adacore.com>
Wed, 10 Nov 2021 08:57:42 +0000 (08:57 +0000)
commit0e988162f6e9cbb9bea998b4f1febda199769692
tree12e58aca9976de7fb726a4991b9c94c21bf273e9
parent76a71469f3ea7a6cb9257cec9a34a8c8687f3d15
[Ada] Warn for bidirectional characters

gcc/ada/

* scng.adb (Check_Bidi): New procedure to give warning. Note
that this is called only for non-ASCII characters, so should not
be an efficiency issue.
(Slit): Call Check_Bidi for wide characters in string_literals.
(Minus_Case): Call Check_Bidi for wide characters in comments.
(Char_Literal_Case): Call Check_Bidi for wide characters in
character_literals.  Move Accumulate_Checksum down, because
otherwise, if Err is True, the Code is uninitialized.
* errout.ads: Make the obsolete nature of "Insertion character
?" more prominent; one should not have to read several
paragraphs before finding out that it's obsolete.
gcc/ada/errout.ads
gcc/ada/scng.adb