Skip to content
Snippets Groups Projects
Commit 34aba154 authored by Ronan Desplanques's avatar Ronan Desplanques Committed by Marc Poulhiès
Browse files

ada: Fix crash with -gnatdJ and -gnatw.w

This patch fixes a crash when -gnatdJ is enabled and a warning
must be emitted about an ineffective pragma Warnings clause.

Some modifications are made to the specific warnings machinery so
that warnings carry the ID of the pragma node they're about, so the
-gnatdJ mechanism can find an appropriate enclosing subprogram.

gcc/ada/

	* sem_prag.adb (Analyze_Pragma): Adapt call to new signature.
	* erroutc.ads (Set_Specific_Warning_Off): change signature
	and update documentation.
	(Validate_Specific_Warnings): Move ...
	* errout.adb: ... here and change signature. Also move body
	of Validate_Specific_Warnings from erroutc.adb.
	(Finalize): Adapt call.
	* errout.ads (Set_Specific_Warning_Off): Adapt signature of
	renaming.
	* erroutc.adb (Set_Specific_Warning_Off): Adapt signature and
	body.
	(Validate_Specific_Warnings): Move to the body of Errout.
	(Warning_Specifically_Suppressed): Adapt body.
parent 06262650
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment