]> git.ipfire.org Git - thirdparty/gcc.git/commit
[Ada] Fix confusing error expression on an unknown restriction
authorPiotr Trojanek <trojanek@adacore.com>
Thu, 23 Jun 2022 11:09:51 +0000 (13:09 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Tue, 12 Jul 2022 12:24:14 +0000 (12:24 +0000)
commit7e5a0317adbf1c9bc2ee5f6446bd161854c03373
tree404cb9145da0dcfdb13527642d4705480cb8c53d
parent3a7a02f4355bb81f7cb253fc900ad57c9503f5c7
[Ada] Fix confusing error expression on an unknown restriction

When pragma Restriction is used with an unknown restriction identifier,
it is better to not process the restriction expression, as it will
likely produce confusing error message.

In particular, an odd message appeared when there was a typo in the
restriction identifier whose expression requires special processing
(e.g.  No_Dependence_On instead of No_Dependence).

gcc/ada/

* sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
Do not process expression of unknown restrictions.
gcc/ada/sem_prag.adb