diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-03-02 19:28:05 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-03-02 19:28:05 +0000 |
commit | 9d63dbe6b454a33381a73e1ca93aff85b0594f05 (patch) | |
tree | f8a1cb507af3e7ceb424d8056fc0f50558e9cd28 /gcc/ada | |
parent | f98abc094eceacf320655d4f16c9f71243455544 (diff) | |
download | gcc-9d63dbe6b454a33381a73e1ca93aff85b0594f05.tar.gz |
2008-03-02 Basile Starynkevitch <basile@starynkevitch.net>
merged with trunk 132817
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@132818 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/ChangeLog | 18 | ||||
-rw-r--r-- | gcc/ada/misc.c | 2 | ||||
-rw-r--r-- | gcc/ada/s-fileio.adb | 16 | ||||
-rw-r--r-- | gcc/ada/sem_ch13.adb | 6 | ||||
-rw-r--r-- | gcc/ada/trans.c | 19 |
5 files changed, 32 insertions, 29 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 954f1a90c5a..d86bfeb22eb 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,21 @@ +2008-02-27 Samuel Tardieu <sam@rfc1149.net> + + PR ada/22255 + * s-fileio.adb (Reset): Do not raise Use_Error if mode isn't changed. + +2008-02-27 Samuel Tardieu <sam@rfc1149.net> + + PR ada/34799 + * sem_ch13.adb (Analyze_Record_Representation_Clause): Check + that underlying type is present. + +2008-02-26 Tom Tromey <tromey@redhat.com> + + * misc.c (internal_error_function): Remove test of + USE_MAPPED_LOCATION. + * trans.c (gigi): Remove test of USE_MAPPED_LOCATION. + (Sloc_to_locus): Remove old location code. + 2008-02-25 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> * gnat_rm.texi, gnat_ugn.texi: Fix spacing after `e.g.' and diff --git a/gcc/ada/misc.c b/gcc/ada/misc.c index c54bd9f7b90..4ddf10f23a9 100644 --- a/gcc/ada/misc.c +++ b/gcc/ada/misc.c @@ -412,11 +412,9 @@ internal_error_function (const char *msgid, va_list *ap) fp.Array = buffer; s = expand_location (input_location); -#ifdef USE_MAPPED_LOCATION if (flag_show_column && s.column != 0) asprintf (&loc, "%s:%d:%d", s.file, s.line, s.column); else -#endif asprintf (&loc, "%s:%d", s.file, s.line); temp_loc.Low_Bound = 1; temp_loc.High_Bound = strlen (loc); diff --git a/gcc/ada/s-fileio.adb b/gcc/ada/s-fileio.adb index a56877e2ad6..7a490cdc15c 100644 --- a/gcc/ada/s-fileio.adb +++ b/gcc/ada/s-fileio.adb @@ -1074,13 +1074,15 @@ package body System.File_IO is begin Check_File_Open (File); - -- Change of mode not allowed for shared file or file with no name - -- or file that is not a regular file, or for a system file. - - if File.Shared_Status = Yes - or else File.Name'Length <= 1 - or else File.Is_System_File - or else not File.Is_Regular_File + -- Change of mode not allowed for shared file or file with no name or + -- file that is not a regular file, or for a system file. Note that we + -- allow the "change" of mode if it is not in fact doing a change. + + if Mode /= File.Mode + and then (File.Shared_Status = Yes + or else File.Name'Length <= 1 + or else File.Is_System_File + or else not File.Is_Regular_File) then raise Use_Error; diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb index 33a55a825b3..2b58c12edcd 100644 --- a/gcc/ada/sem_ch13.adb +++ b/gcc/ada/sem_ch13.adb @@ -2747,7 +2747,10 @@ package body Sem_Ch13 is -- We are only interested in the case where there is at least one -- unrepped component, and at least half the components have rep -- clauses. We figure that if less than half have them, then the - -- partial rep clause is really intentional. + -- partial rep clause is really intentional. If the component + -- type has no underlying type set at this point (as for a generic + -- formal type), we don't know enough to give a warning on the + -- component. if Num_Unrepped_Components > 0 and then Num_Unrepped_Components < Num_Repped_Components @@ -2756,6 +2759,7 @@ package body Sem_Ch13 is while Present (Comp) loop if No (Component_Clause (Comp)) and then Comes_From_Source (Comp) + and then Present (Underlying_Type (Etype (Comp))) and then (Is_Scalar_Type (Underlying_Type (Etype (Comp))) or else Size_Known_At_Compile_Time (Underlying_Type (Etype (Comp)))) diff --git a/gcc/ada/trans.c b/gcc/ada/trans.c index d1b454ca4d8..34cb297d245 100644 --- a/gcc/ada/trans.c +++ b/gcc/ada/trans.c @@ -244,7 +244,6 @@ gigi (Node_Id gnat_root, int max_gnat_node, int number_name, type_annotate_only = (gigi_operating_mode == 1); -#ifdef USE_MAPPED_LOCATION for (i = 0; i < number_files; i++) { /* Use the identifier table to make a permanent copy of the filename as @@ -268,7 +267,6 @@ gigi (Node_Id gnat_root, int max_gnat_node, int number_name, linemap_position_for_column (line_table, 252 - 1); linemap_add (line_table, LC_LEAVE, 0, NULL, 0); } -#endif /* Initialize ourselves. */ init_code_table (); @@ -6650,7 +6648,6 @@ Sloc_to_locus (Source_Ptr Sloc, location_t *locus) return false; if (Sloc <= Standard_Location) -#ifdef USE_MAPPED_LOCATION { *locus = BUILTINS_LOCATION; return false; @@ -6667,22 +6664,6 @@ Sloc_to_locus (Source_Ptr Sloc, location_t *locus) + ((line - map->to_line) << map->column_bits) + (column & ((1 << map->column_bits) - 1)); } -#else - return false; - - /* Use the identifier table to make a hashed, permanent copy of the filename, - since the name table gets reallocated after Gigi returns but before all - the debugging information is output. The __gnat_to_canonical_file_spec - call translates filenames from pragmas Source_Reference that contain host - style syntax not understood by gdb. */ - locus->file - = IDENTIFIER_POINTER - (get_identifier - (__gnat_to_canonical_file_spec - (Get_Name_String (Full_Debug_Name (Get_Source_File_Index (Sloc)))))); - - locus->line = Get_Logical_Line_Number (Sloc); -#endif ref_filename = IDENTIFIER_POINTER |