Tested on i686-linux, committed on trunk The form of the Warnings pragma that suppresses specific messages does not work for warnings coming from gigi/backend. The reason is that Errout.Finalize was calling Validate_Specific_Warnings before the back end was called. The symptom was that the warning was properly suppressed, but a spurious warning that the pragma had not suppressed any warnings was generated. The fix embodied in this patch is to introduce a parameter Last_Call for Finalize that is False for all calls except the last, and True for the last call. Validate_Specific_Warnings is then called only for the last call. gnat.dg/warn2.adb should compile quietly with no warnings. 2007-08-14 Robert Dewar * comperr.adb: Fix problem with suppressing warning messages from gigi * erroutc.ads, erroutc.adb, errout.ads, errout.adb (Write_Eol): Remove trailing spaces before writing the line (Write_Eol_Keep_Blanks): New procedure to write a line, including possible trailing spaces. (Output_Source_Line): Call Write_Eol_Keep_Blanks to output a source line Fix problem with suppressing warning messages from back end Improve handling of deleted warnings * gnat1drv.adb: Fix problem with suppressing warning messages from back end Handle setting of Static_Dispatch_Tables flag. * prepcomp.adb: Fix problem with suppressing warning messages from back end * exp_intr.adb: Improve handling of deleted warnings