From 8cce3d7579f87245302f6ceae1b33412558da1c0 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Thu, 9 Sep 2010 14:46:27 +0200 Subject: [multiple changes] 2010-09-09 Robert Dewar * sem_attr.adb: Minor reformatting. 2010-09-09 Thomas Quinot * socket.c (__gnat_socket_ioctl): On Darwin, the req parameter is an unsigned long, not an int. 2010-09-09 Vincent Celier * make.adb, mlib-prj.adb, prj.adb, prj-nmsc.adb, mlib-tgt.adb, prj-conf.adb, prj-env.adb: Use Display_Name instead of Name whenever we are not checking for equality of path or file names. 2010-09-09 Ed Schonberg * exp_util.adb (Remove_Side_Effects): If the expression is a packed array reference, reset the Analyzed flag so that it is properly expanded when the resulting object declaration is analyzed. 2010-09-09 Vincent Celier * sinput-p.adb (Source_File_Is_Subunit): Return False if X is No_Source_File. 2010-09-09 Ramon Fernandez * sysdep.c: The wrSbc8548 BSP in MILS doesn't know anything about the VX_SPE_TASK option, so disable it. From-SVN: r164084 --- gcc/ada/sinput-p.adb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'gcc/ada/sinput-p.adb') diff --git a/gcc/ada/sinput-p.adb b/gcc/ada/sinput-p.adb index 2c9dc06..5681314 100644 --- a/gcc/ada/sinput-p.adb +++ b/gcc/ada/sinput-p.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2008, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2010, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -151,6 +151,12 @@ package body Sinput.P is function Source_File_Is_Subunit (X : Source_File_Index) return Boolean is begin + -- Nothing to do if X is null. So, simply return False. + + if X = No_Source_File then + return False; + end if; + Prj.Err.Scanner.Initialize_Scanner (X); -- No error for special characters that are used for preprocessing -- cgit v1.1