summaryrefslogtreecommitdiff
path: root/gcc/ada/s-restri.ads
Commit message (Collapse)AuthorAgeFilesLines
* 2004-05-17 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>charlet2004-05-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Part of function-at-a-time conversion * misc.c (adjust_decl_rtl): Deleted. (LANG_HOOKS_PUSHLEVEL, LANG_HOOKS_POPLEVEL, LANG_HOOKS_SET_BLOCK): Define. * gigi.h: (adjust_decl_rtl, kept_level_p, set_block): Deleted. (add_decl_stmt, add_stmt, block_has_vars): New functions. (gnat_pushlevel, gnat_poplevel): Renamed from pushlevel and poplevel. * decl.c (elaborate_expression, maybe_pad_type): Call add_decl_stmt when making a decl. (gnat_to_gnu_entity): Likewise. Use add_stmt to update setjmp buffer. Set TREE_ADDRESSABLE instead of calling put_var_into_stack and flush_addressof. No longer call adjust_decl_rtl. (DECL_INIT_BY_ASSIGN_P): New macro. (DECL_STMT_VAR): Likewise. * trans.c (gigi): Call start_block_stmt to make the outermost BLOCK_STMT. (gnat_to_code, gnu_to_gnu, tree_transform, process_decls, process_type): Call start_block_stmt and end_block_stmt temporarily. Use gnat_expand_stmt instead of expand_expr_stmt. (add_decl_stmt): New function. (tree_transform): Call it. (add_stmt): Also emit initializing assignment for DECL_STMT if needed. (end_block_stmt): Set type and NULL_STMT. (gnat_expand_stmt): Make recursize call instead of calling expand_expr_stmt. (gnat_expand_stmt, case DECL_STMT): New case. (set_lineno_from_sloc): Do nothing if global. (gnu_block_stmt_node, gnu_block_stmt_free_list): New variables. (start_block_stmt, add_stmt, end_block_stmt): New functions. (build_block_stmt): Call them. (gnat_to_code): Don't expand NULL_STMT. (build_unit_elab): Rename pushlevel and poplevel to gnat_* and change args. (tree_transform): Likewise. (tree_transform, case N_Null_Statement): Return NULL_STMT. (gnat_expand_stmt, case NULL_STMT): New case. (gnat_expand_stmt, case IF_STMT): Allow nested IF_STMT to have no IF_STMT_TRUE. * utils2.c (gnat_mark_addressable, case VAR_DECL): Do not set TREE_ADDRESSABLE. * utils.c (create_var_decl): Do not call expand_decl or expand_decl_init. Set TREE_ADDRESSABLE instead of calling gnat_mark_addressable. Set DECL_INIT_BY_ASSIGN_P when needed and do not generate MODIFY_EXPR here. (struct e_stack): Add chain_next to GTY. (struct binding_level): Deleted. (struct ada_binding_level): New struct. (free_block_chain): New. (global_binding_level, clear_binding_level): Deleted. (global_bindings_p): Rework to see if no chain. (kept_level_p, set_block): Deleted. (gnat_pushlevel): Renamed from pushlevel and extensive reworked to use new data structure and work directly on BLOCK node. (gnat_poplevel): Similarly. (get_decls): Look at BLOCK_VARS. (insert_block): Work directly on BLOCK node. (block_has_var): New function. (pushdecl): Rework for new binding structures. (gnat_init_decl_processing): Rename and rework calls to pushlevel and poplevel. (build_subprog_body): Likewise. (end_subprog_body): Likewise; also set up BLOCK in DECL_INITIAL. * ada-tree.def (DECL_STMT, NULL_STMT): New codes. * ada-tree.h: (DECL_INIT_BY_ASSIGN_P): New macro. (DECL_STMT_VAR): Likewise. 2004-05-17 Robert Dewar <dewar@gnat.com> * restrict.ads, restrict.adb (Process_Restriction_Synonym): New procedure * sem_prag.adb (Analyze_Pragma, case Restrictions): Cleanup handling of restriction synonyums by using Restrict.Process_Restriction_Synonyms. * snames.ads, snames.adb: Add entries for Process_Restriction_Synonym * s-restri.ads (Tasking_Allowed): Correct missing comment * s-rident.ads: Add entries for restriction synonyms * ali.adb: Fix some problems with badly formatted ALI files that can result in infinite loops. * s-taprop-lynxos.adb, s-tpopsp-lynxos.adb, s-taprop-tru64.adb, s-tpopsp-posix-foreign.adb, s-taprop-irix.adb, s-interr-sigaction.adb, s-taprop-irix-athread.adb, s-taprop-hpux-dce.adb, s-taprop-linux.adb, s-taprop-dummy.adb, s-interr-dummy.adb, s-taprop-os2.adb, s-taprop-solaris.adb, s-tpopsp-solaris.adb, s-asthan-vms.adb, s-inmaop-vms.adb, s-interr-vms.adb, s-taprop-vms.adb, s-tpopde-vms.adb, s-taprop-mingw.adb, s-interr-vxworks.adb, s-taprop-vxworks.adb, s-tpopsp-vxworks.adb, s-taprop-posix.adb, s-tpopsp-posix.adb, s-tratas-default.adb, a-dynpri.adb, a-tasatt.adb, a-taside.adb, a-taside.ads, exp_attr.adb, exp_ch9.adb, g-thread.adb, rtsfind.ads, sem_attr.adb, s-interr.adb, s-interr.ads, s-soflin.ads, s-taasde.adb, s-taasde.ads, s-taenca.adb, s-taenca.ads, s-taprop.ads, s-tarest.adb, s-tarest.ads, s-tasdeb.adb, s-tasdeb.ads, s-tasini.adb, s-tasini.ads, s-taskin.adb, s-taskin.ads, s-tasque.adb, s-tasque.ads, s-tasren.adb, s-tasren.ads, s-tassta.adb, s-tassta.ads, s-tasuti.adb, s-tasuti.ads, s-tataat.adb, s-tataat.ads, s-tpinop.adb, s-tpinop.ads, s-tpoben.adb, s-tpobop.adb, s-tpobop.ads, s-tporft.adb, s-tposen.adb, s-tposen.ads, s-tratas.adb, s-tratas.ads: Change Task_ID to Task_Id (minor cleanup). 2004-05-17 Vincent Celier <celier@gnat.com> * g-os_lib.adb (Normalize_Pathname.Final_Value): Remove trailing directory separator. * prj-proc.adb (Recursive_Process): Inherit attribute Languages from project being extended, if Languages is not declared in extending project. 2004-05-17 Javier Miranda <miranda@gnat.com> * sem_ch10.adb (Install_Limited_Withed_Unit): Do not install the limited view of a visible sibling. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@81935 138bc75d-0d04-0410-961f-82ee72b054a4
* 2004-03-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>charlet2004-03-051-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * trans.c: Reflect GCC changes to fix bootstrap problem. Add warning for suspicious aliasing unchecked conversion. 2004-03-05 Robert Dewar <dewar@gnat.com> * 56taprop.adb, 5ataprop.adb: Remove unneeded unchecked conversions * a-tags.adb, a-tags.ads, s-finimp.adb, s-finroo.ads, i-cpoint.ads, i-cpoint.adb, i-cstrin.adb, i-cstrin.ads, 5iosinte.ads, 5sosinte.ads, 5staspri.ads, 5itaprop.adb, 5staprop.adb, 5wtaprop.adb, s-tataat.ads, s-tataat.adb: Move unchecked conversion to spec to avoid warnings. * s-tasini.adb, s-taskin.ads, 5atpopsp.adb: Correct spelling Task_Id to Task_ID * 7stpopsp.adb: Correct casing in To_Task_ID call * a-strsea.ads, a-strsea.adb: Minor reformatting * einfo.ads, einfo.adb: Define new flag No_Strict_Aliasing * errout.ads: Switch for VMS is now NO_STRICT_ALIASING. Adjust Max_Msg_Length to be clearly large enough. * fe.h: Define In_Same_Source_Unit * osint.adb: Add pragma Warnings Off to suppress warnings * g-dyntab.adb, g-table.adb, g-thread.adb: Add Warnings (Off) to kill aliasing warnings. * opt.ads: Put entries in alpha order. Add entry for No_Strict_Aliasing * par-prag.adb: Add dummy entry for No_Strict_Aliasing pragma * sem_ch13.adb: Generate validate unchecked conversion nodes for gcc. * sem_ch3.adb: Set No_Strict_Aliasing flag if config pragma set. * sem_prag.adb: Implement pragma No_Strict_Aliasing. * sinfo.ads: Remove obsolete comment on validate unchecked conversion node. We now do generate them for gcc back end. * table.adb, sinput.adb: Add pragma Warnings Off to suppress aliasing warning. * sinput-c.adb: Fix bad name in header. Add pragma Warnings Off to suppress aliasing warning. * sinput-l.adb: Add pragma Warnings Off to suppress aliasing warning. * snames.h, snames.ads, snames.adb: Add entry for pragma No_Strict_Aliasing. 2004-03-05 Vincent Celier <celier@gnat.com> * prj-com.ads: Add hash table Files_Htable to check when a file name is already a source of another project. * prj-nmsc.adb (Record_Source): Before recording a new source, check if its file name is not already a source of another project. Report an error if it is. * gnatcmd.adb: When GNAT PRETTY is invoked with a project file and no source file name, call gnatpp with all the sources of the main project. * vms_conv.adb (Initialize): GNAT PRETTY may be called with any number of file names. * vms_data.ads: Correct documentation of new /OPTIMIZE keyword NO_STRICT_ALIASING. Add new qualifier for GNAT PRETTY: /RUNTIME_SYSTEM=, converted to --RTS= /NOTABS, converted to -notabs 2004-03-05 Pascal Obry <obry@gnat.com> * make.adb: Minor reformatting. 2004-03-05 Ed Schonberg <schonberg@gnat.com> Part of implemention of AI-262. * par-ch10.adb (P_Context_Clause): Recognize private with_clauses. * sem_ch10.ads, sem_ch10.adb: (Install_Private_With_Clauses): New procedure. * sem_ch3.adb (Analyze_Component_Declaration): Improve error message when component type is a partially constrained class-wide subtype. (Constrain_Discriminated_Type): If parent type has unknown discriminants, a constraint is illegal, even if full view has discriminants. (Build_Derived_Record_Type): Inherit discriminants when deriving a type with unknown discriminants whose full view is a discriminated record. * sem_ch7.adb (Preserve_Full_Attributes): Preserve Has_Discriminants flag, to handle properly derivations of tagged types with unknown discriminants. (Analyze_Package_Spec, Analyze_Package_Body): Install Private_With_Clauses before analyzing private part or body. * einfo.ads: Indicate that both Has_Unknown_Discriminants and Has_Discriminants can be true for a given type (documentation). 2004-03-05 Arnaud Charlet <charlet@act-europe.fr> * s-restri.ads: Fix license (GPL->GMGPL). * s-tassta.adb: Minor reformatting. * s-tasren.adb: Replace manual handling of Self_Id.ATC_Nesting_Level by calls to Exit_One_ATC_Level, since additional clean up is performed by this function. * s-tpobop.adb: Replace manual handling of Self_Id.ATC_Nesting_Level by calls to Exit_One_ATC_Level, since additional clean up is performed by this function. 2004-03-05 GNAT Script <nobody@gnat.com> * Make-lang.in: Makefile automatically updated git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@78964 138bc75d-0d04-0410-961f-82ee72b054a4
* 2004-02-04 Robert Dewar <dewar@gnat.com>charlet2004-02-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 5gtasinf.adb, 5gtasinf.ads, 5gtaprop.adb, ali.adb, ali.ads, gprcmd.adb: Minor reformatting * bindgen.adb: Output restrictions string for new style restrictions handling * impunit.adb: Add s-rident.ads (System.Rident) and s-restri (System.Restrictions) * lib-writ.adb: Fix bug in writing restrictions string (last few entries wrong) * s-restri.ads, s-restri.adb: Change name Restrictions to Run_Time_Restrictions to avoid conflict with package name. Add circuit to read and acquire run time restrictions. 2004-02-04 Jose Ruiz <ruiz@act-europe.fr> * restrict.ads, restrict.adb: Use the new restriction No_Task_Attributes_Package instead of the old No_Task_Attributes. * sem_prag.adb: No_Task_Attributes is a synonym of No_Task_Attributes_Package. * snames.ads, snames.adb: New entry for proper handling of No_Task_Attributes. * s-rident.ads: Adding restriction No_Task_Attributes_Package (AI-00249) that supersedes the GNAT specific restriction No_Task_Attributes. 2004-02-04 Ed Schonberg <schonberg@gnat.com> * sem_prag.adb: (Analyze_Pragma, case Warnings): In an inlined body, as in an instance body, an identifier may be wrapped in an unchecked conversion. 2004-02-04 Vincent Celier <celier@gnat.com> * lib-writ.ads: Comment update for the W lines * bld.adb: (Expression): An empty string list is static * fname-uf.adb: Minor comment update * fname-uf.ads: (Get_File_Name): Document new parameter May_Fail * gnatbind.adb: Initialize Cumulative_Restrictions with the restrictions on the target. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@77233 138bc75d-0d04-0410-961f-82ee72b054a4
* 2004-02-02 Vincent Celier <celier@gnat.com>charlet2004-02-021-0/+61
* gprcmd.adb (Check_Args): If condition is false, print the invoked comment before the usage. Gprcmd: Fail when command is not recognized. (Usage): Document command "prefix" * g-md5.adb (Digest): Process last block. (Update): Do not process last block. Store remaining characters and length in Context. * g-md5.ads (Update): Document that several call to update are equivalent to one call with the concatenated string. (Context): Add fields to allow new Update behaviour. * fname-uf.ads/adb (Get_File_Name): New Boolean parameter May_Fail, defaulted to False. When May_Fail is True and no existing file can be found, return No_File. * 6vcstrea.adb: Inlined functions are now wrappers to implementation functions. * lib-writ.adb (Write_With_Lines): When body file does not exist, use spec file name instead on the W line. 2004-02-02 Robert Dewar <dewar@gnat.com> * ali.adb: Read and acquire info from new format restrictions lines * bcheck.adb: Add circuits for checking restrictions with parameters * bindgen.adb: Output dummy restrictions data To be changed later * ali.ads, checks.adb, exp_aggr.adb, exp_attr.adb, exp_ch11.adb, exp_ch3.adb, exp_ch5.adb, exp_ch6.adb, exp_ch7.adb, exp_util.adb, freeze.adb, gnat1drv.adb, sem_attr.adb, sem_ch10.adb, sem_ch11.adb, sem_ch12.adb, targparm.adb, targparm.ads, tbuild.adb, sem_ch2.adb, sem_elab.adb, sem_res.adb: Minor changes for new restrictions handling. * exp_ch9.adb (Build_Master_Entity): Cleanup the code (also suppresses the warning message on access to possibly uninitialized variable S) Minor changes for new restrictions handling. * gnatbind.adb: Minor reformatting Minor changes for new restrictions handling Move circuit for -r processing here from bcheck (cleaner) * gnatcmd.adb, gnatlink.adb: Minor reformatting * lib-writ.adb: Output new format restrictions lines * lib-writ.ads: Document new R format lines for new restrictions handling. * s-restri.ads/adb: New files * Makefile.rtl: Add entry for s-restri.ads/adb * par-ch3.adb: Fix bad error messages starting with upper case letter Minor reformatting * restrict.adb: Major rewrite throughout for new restrictions handling Major point is to handle restrictions with parameters * restrict.ads: Major changes in interface to handle restrictions with parameters. Also generally simplifies setting of restrictions. * snames.ads/adb: New entry for proper handling of No_Requeue * sem_ch3.adb (Count_Tasks): New circuitry for implementing Max_Tasks restriction counting. Other minor changes for new restrictions handling * sem_prag.adb: No_Requeue is a synonym for No_Requeue_Statements. Restriction_Warnings now allows full parameter notation Major rewrite of Restrictions for new restrictions handling 2004-02-02 Javier Miranda <miranda@gnat.com> * par-ch3.adb (P_Identifier_Declarations): Give support to the Ada 0Y syntax rule for object renaming declarations. (P_Array_Type_Definition): Give support for the Ada 0Y syntax rule for component definitions. * sem_ch3.adb (Analyze_Component_Declaration): Give support to access components. (Array_Type_Declaration): Give support to access components. In addition it was also modified to reflect the name of the object in anonymous array types. The old code did not take into account that it is possible to have an unconstrained anonymous array with an initial value. (Check_Or_Process_Discriminants): Allow access discriminant in non-limited types. (Process_Discriminants): Allow access discriminant in non-limited types Initialize the new Access_Definition field in N_Object_Renaming_Decl node. Change Ada0Y to Ada 0Y in comments * sem_ch4.adb (Find_Equality_Types): Allow anonymous access types in equality operators. Change Ada0Y to Ada 0Y in comments * sem_ch8.adb (Analyze_Object_Renaming): Give support to access renamings Change Ada0Y to Ada 0Y in comments * sem_type.adb (Find_Unique_Type): Give support to the equality operators for universal access types Change Ada0Y to Ada 0Y in comments * sinfo.adb (Access_Definition, Set_Access_Definition): New subprograms * sinfo.ads (N_Component_Definition): Addition of Access_Definition field. (N_Object_Renaming_Declaration): Addition of Access_Definition field Change Ada0Y to Ada 0Y in comments * sprint.adb (Sprint_Node_Actual): Give support to the new syntax for component definition and object renaming nodes Change Ada0Y to Ada 0Y in comments 2004-02-02 Jose Ruiz <ruiz@act-europe.fr> * restrict.adb: Use the new restriction identifier No_Requeue_Statements instead of the old No_Requeue for defining the restricted profile. * sem_ch9.adb (Analyze_Requeue): Check the new restriction No_Requeue_Statements. * s-rident.ads: Adding restriction No_Requeue_Statements (AI-00249) that supersedes the GNAT specific restriction No_Requeue. The later is kept for backward compatibility. 2004-02-02 Ed Schonberg <schonberg@gnat.com> * lib.ads, i-cobol.ads, * s-stoele.ads, s-thread.ads, style.ads, 5staprop.adb, atree.adb, atree.ads, g-crc32.ads: Remove redundant pragma and fix incorrect ones. * sem_prag.adb For pragma Inline and pragma Pure_Function, emit a warning if the pragma is redundant. 2004-02-02 Thomas Quinot <quinot@act-europe.fr> * 5staprop.adb: Add missing 'constant' keywords. * Makefile.in: use consistent value for SYMLIB on platforms where libaddr2line is supported. 2004-02-02 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * utils.c (end_subprog_body): Do not call rest_of_compilation if just annotating types. 2004-02-02 Olivier Hainque <hainque@act-europe.fr> * init.c (__gnat_install_handler): Setup an alternate stack for signal handlers in the environment thread. This allows proper propagation of an exception on stack overflows in this thread even when the builtin ABI stack-checking scheme is used without support for a stack reserve region. * utils.c (create_field_decl): Augment the head comment about bitfield creation, and don't account for DECL_BIT_FIELD in DECL_NONADDRESSABLE_P here, because the former is not accurate enough at this point. Let finish_record_type decide instead. Don't make a bitfield if the field is to be addressable. Always set a size for the field if the record is packed, to ensure the checks for bitfield creation are triggered. (finish_record_type): During last pass over the fields, clear DECL_BIT_FIELD when possible in the !STRICT_ALIGNMENT case, as this is not covered by the calls to layout_decl. Adjust DECL_NONADDRESSABLE_P from DECL_BIT_FIELD. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@77110 138bc75d-0d04-0410-961f-82ee72b054a4