OSDN Git Service

2009-04-08 Thomas Quinot <quinot@adacore.com>
[pf3gnuchains/gcc-fork.git] / gcc / ada / snames.adb
index d72b0b8..0617391 100644 (file)
@@ -6,9 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---                            $Revision$                            --
---                                                                          --
---          Copyright (C) 1992-2001, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2008, 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- --
@@ -18,8 +16,8 @@
 -- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
 -- for  more details.  You should have  received  a copy of the GNU General --
 -- Public License  distributed with GNAT;  see file COPYING.  If not, write --
--- to  the Free Software Foundation,  59 Temple Place - Suite 330,  Boston, --
--- MA 02111-1307, USA.                                                      --
+-- to  the  Free Software Foundation,  51  Franklin  Street,  Fifth  Floor, --
+-- Boston, MA 02110-1301, USA.                                              --
 --                                                                          --
 -- As a special exception,  if other files  instantiate  generics from this --
 -- unit, or you link  this unit with other files  to produce an executable, --
 -- covered by the  GNU Public License.                                      --
 --                                                                          --
 -- GNAT was originally developed  by the GNAT team at  New York University. --
--- It is now maintained by Ada Core Technologies Inc (http://www.gnat.com). --
+-- Extensive contributions were provided by Ada Core Technologies Inc.      --
 --                                                                          --
 ------------------------------------------------------------------------------
 
-with Namet; use Namet;
+with Opt;   use Opt;
+with Table;
+with Types; use Types;
 
 package body Snames is
 
+   --  Table used to record convention identifiers
+
+   type Convention_Id_Entry is record
+      Name       : Name_Id;
+      Convention : Convention_Id;
+   end record;
+
+   package Convention_Identifiers is new Table.Table (
+     Table_Component_Type => Convention_Id_Entry,
+     Table_Index_Type     => Int,
+     Table_Low_Bound      => 1,
+     Table_Initial        => 50,
+     Table_Increment      => 200,
+     Table_Name           => "Name_Convention_Identifiers");
+
    --  Table of names to be set by Initialize. Each name is terminated by a
    --  single #, and the end of the list is marked by a null entry, i.e. by
    --  two # marks in succession. Note that the table does not include the
@@ -48,11 +63,10 @@ package body Snames is
      "off#" &
      "space#" &
      "time#" &
-     "_init_proc#" &
-     "_size#" &
      "_abort_signal#" &
-     "_address_resolver#" &
+     "_alignment#" &
      "_assign#" &
+     "_atcb#" &
      "_chain#" &
      "_clean#" &
      "_controller#" &
@@ -64,30 +78,32 @@ package body Snames is
      "_local_final_list#" &
      "_master#" &
      "_object#" &
+     "_postconditions#" &
      "_priority#" &
+     "_process_atsd#" &
+     "_relative_deadline#" &
+     "_result#" &
+     "_secondary_stack#" &
      "_service#" &
+     "_size#" &
+     "_stack#" &
      "_tags#" &
      "_task#" &
      "_task_id#" &
      "_task_info#" &
      "_task_name#" &
      "_trace_sp#" &
+     "_disp_asynchronous_select#" &
+     "_disp_conditional_select#" &
+     "_disp_get_prim_op_kind#" &
+     "_disp_get_task_id#" &
+     "_disp_requeue#" &
+     "_disp_timed_select#" &
      "initialize#" &
      "adjust#" &
      "finalize#" &
      "next#" &
      "prev#" &
-     "_deep_adjust#" &
-     "_equality#" &
-     "_deep_finalize#" &
-     "_deep_initialize#" &
-     "_input#" &
-     "_output#" &
-     "_ras_access#" &
-     "_ras_dereference#" &
-     "_read#" &
-     "_rep_to_pos#" &
-     "_write#" &
      "allocate#" &
      "deallocate#" &
      "dereference#" &
@@ -97,35 +113,48 @@ package body Snames is
      "float_io#" &
      "integer_io#" &
      "modular_io#" &
-     "a_textio#" &
-     "a_witeio#" &
      "const#" &
      "<error>#" &
      "go#" &
      "put#" &
      "put_line#" &
      "to#" &
+     "exception_traces#" &
      "finalization#" &
      "finalization_root#" &
      "interfaces#" &
+     "most_recent_exception#" &
      "standard#" &
      "system#" &
      "text_io#" &
      "wide_text_io#" &
+     "wide_wide_text_io#" &
+     "no_dsa#" &
+     "garlic_dsa#" &
+     "polyorb_dsa#" &
      "addr#" &
      "async#" &
      "get_active_partition_id#" &
      "get_rci_package_receiver#" &
+     "get_rci_package_ref#" &
      "origin#" &
      "params#" &
      "partition#" &
      "partition_interface#" &
      "ras#" &
+     "_call#" &
      "rci_name#" &
      "receiver#" &
-     "result#" &
      "rpc#" &
      "subp_id#" &
+     "operation#" &
+     "argument#" &
+     "arg_modes#" &
+     "handler#" &
+     "target#" &
+     "req#" &
+     "obj_typecode#" &
+     "stub#" &
      "Oabs#" &
      "Oand#" &
      "Omod#" &
@@ -147,36 +176,62 @@ package body Snames is
      "Oexpon#" &
      "ada_83#" &
      "ada_95#" &
+     "ada_05#" &
+     "ada_2005#" &
+     "assertion_policy#" &
+     "assume_no_invalid_values#" &
      "c_pass_by_copy#" &
+     "check_name#" &
+     "check_policy#" &
+     "compile_time_error#" &
+     "compile_time_warning#" &
+     "compiler_unit#" &
      "component_alignment#" &
+     "convention_identifier#" &
+     "debug_policy#" &
+     "detect_blocking#" &
      "discard_names#" &
      "elaboration_checks#" &
      "eliminate#" &
      "extend_system#" &
      "extensions_allowed#" &
      "external_name_casing#" &
+     "favor_top_level#" &
      "float_representation#" &
+     "implicit_packing#" &
      "initialize_scalars#" &
+     "interrupt_state#" &
      "license#" &
      "locking_policy#" &
      "long_float#" &
      "no_run_time#" &
+     "no_strict_aliasing#" &
      "normalize_scalars#" &
+     "optimize_alignment#" &
+     "persistent_bss#" &
      "polling#" &
+     "priority_specific_dispatching#" &
+     "profile#" &
+     "profile_warnings#" &
      "propagate_exceptions#" &
      "queuing_policy#" &
      "ravenscar#" &
      "restricted_run_time#" &
      "restrictions#" &
+     "restriction_warnings#" &
      "reviewable#" &
      "source_file_name#" &
+     "source_file_name_project#" &
      "style_checks#" &
      "suppress#" &
+     "suppress_exception_locations#" &
      "task_dispatching_policy#" &
+     "universal_data#" &
      "unsuppress#" &
      "use_vads_size#" &
-     "warnings#" &
      "validity_checks#" &
+     "warnings#" &
+     "wide_character_encoding#" &
      "abort_defer#" &
      "all_calls_remote#" &
      "annotate#" &
@@ -185,8 +240,11 @@ package body Snames is
      "atomic#" &
      "atomic_components#" &
      "attach_handler#" &
+     "check#" &
+     "cil_constructor#" &
      "comment#" &
      "common_object#" &
+     "complete_representation#" &
      "complex_representation#" &
      "controlled#" &
      "convention#" &
@@ -203,10 +261,12 @@ package body Snames is
      "export_function#" &
      "export_object#" &
      "export_procedure#" &
+     "export_value#" &
      "export_valued_procedure#" &
      "external#" &
      "finalize_storage_only#" &
      "ident#" &
+     "implemented_by_entry#" &
      "import#" &
      "import_exception#" &
      "import_function#" &
@@ -217,14 +277,16 @@ package body Snames is
      "inline_always#" &
      "inline_generic#" &
      "inspection_point#" &
-     "interface#" &
      "interface_name#" &
      "interrupt_handler#" &
      "interrupt_priority#" &
      "java_constructor#" &
      "java_interface#" &
+     "keep_names#" &
      "link_with#" &
      "linker_alias#" &
+     "linker_constructor#" &
+     "linker_destructor#" &
      "linker_options#" &
      "linker_section#" &
      "list#" &
@@ -232,22 +294,30 @@ package body Snames is
      "main#" &
      "main_storage#" &
      "memory_size#" &
+     "no_body#" &
      "no_return#" &
+     "obsolescent#" &
      "optimize#" &
      "pack#" &
      "page#" &
      "passive#" &
+     "postcondition#" &
+     "precondition#" &
+     "preelaborable_initialization#" &
      "preelaborate#" &
-     "priority#" &
+     "preelaborate_05#" &
      "psect_object#" &
      "pure#" &
+     "pure_05#" &
      "pure_function#" &
+     "relative_deadline#" &
      "remote_call_interface#" &
      "remote_types#" &
      "share_generic#" &
      "shared#" &
      "shared_passive#" &
      "source_reference#" &
+     "static_elaboration_desired#" &
      "stream_convert#" &
      "subtitle#" &
      "suppress_all#" &
@@ -257,28 +327,40 @@ package body Snames is
      "task_info#" &
      "task_name#" &
      "task_storage#" &
+     "thread_local_storage#" &
      "time_slice#" &
      "title#" &
      "unchecked_union#" &
      "unimplemented_unit#" &
+     "universal_aliasing#" &
+     "unmodified#" &
+     "unreferenced#" &
+     "unreferenced_objects#" &
      "unreserve_all_interrupts#" &
      "volatile#" &
      "volatile_components#" &
      "weak_external#" &
      "ada#" &
-     "asm#" &
      "assembler#" &
+     "cil#" &
      "cobol#" &
      "cpp#" &
-     "dll#" &
      "fortran#" &
      "intrinsic#" &
      "java#" &
      "stdcall#" &
      "stubbed#" &
+     "asm#" &
+     "assembly#" &
+     "default#" &
+     "c_plus_plus#" &
+     "dll#" &
      "win32#" &
      "as_is#" &
+     "assertion#" &
+     "attribute_name#" &
      "body_file_name#" &
+     "boolean_entry_barriers#" &
      "casing#" &
      "code#" &
      "component#" &
@@ -286,10 +368,10 @@ package body Snames is
      "copy#" &
      "d_float#" &
      "descriptor#" &
-     "default#" &
      "dot_replacement#" &
      "dynamic#" &
      "entity#" &
+     "entry_count#" &
      "external_name#" &
      "first_optional_parameter#" &
      "form#" &
@@ -298,26 +380,43 @@ package body Snames is
      "gnat#" &
      "gpl#" &
      "ieee_float#" &
+     "ignore#" &
+     "info#" &
      "internal#" &
      "link_name#" &
      "lowercase#" &
+     "max_entry_queue_depth#" &
+     "max_entry_queue_length#" &
      "max_size#" &
      "mechanism#" &
+     "message#" &
      "mixedcase#" &
      "modified_gpl#" &
      "name#" &
      "nca#" &
      "no#" &
+     "no_dependence#" &
+     "no_dynamic_attachment#" &
+     "no_dynamic_interrupts#" &
+     "no_requeue#" &
+     "no_requeue_statements#" &
+     "no_task_attributes#" &
+     "no_task_attributes_package#" &
      "on#" &
      "parameter_types#" &
      "reference#" &
      "restricted#" &
      "result_mechanism#" &
      "result_type#" &
+     "runtime#" &
      "sb#" &
+     "secondary_stack_size#" &
      "section#" &
      "semaphore#" &
+     "short_descriptor#" &
+     "simple_barriers#" &
      "spec_file_name#" &
+     "state#" &
      "static#" &
      "stack_size#" &
      "subunit_file_name#" &
@@ -332,8 +431,10 @@ package body Snames is
      "unknown#" &
      "unrestricted#" &
      "uppercase#" &
+     "user#" &
      "vax_float#" &
      "vms#" &
+     "vtable_ptr#" &
      "working_storage#" &
      "abort_signal#" &
      "access#" &
@@ -362,18 +463,24 @@ package body Snames is
      "digits#" &
      "elaborated#" &
      "emax#" &
+     "enabled#" &
      "enum_rep#" &
+     "enum_val#" &
      "epsilon#" &
      "exponent#" &
      "external_tag#" &
+     "fast_math#" &
      "first#" &
      "first_bit#" &
      "fixed_value#" &
      "fore#" &
+     "has_access_values#" &
      "has_discriminants#" &
+     "has_tagged_values#" &
      "identity#" &
      "img#" &
      "integer_value#" &
+     "invalid_value#" &
      "large#" &
      "last#" &
      "last_bit#" &
@@ -384,14 +491,14 @@ package body Snames is
      "machine_mantissa#" &
      "machine_overflows#" &
      "machine_radix#" &
+     "machine_rounding#" &
      "machine_rounds#" &
      "machine_size#" &
      "mantissa#" &
-     "max_interrupt_priority#" &
-     "max_priority#" &
      "max_size_in_storage_elements#" &
      "maximum_alignment#" &
      "mechanism_code#" &
+     "mod#" &
      "model_emin#" &
      "model_epsilon#" &
      "model_mantissa#" &
@@ -399,12 +506,16 @@ package body Snames is
      "modulus#" &
      "null_parameter#" &
      "object_size#" &
+     "old#" &
      "partition_id#" &
      "passed_by_reference#" &
+     "pool_address#" &
      "pos#" &
      "position#" &
+     "priority#" &
      "range#" &
      "range_length#" &
+     "result#" &
      "round#" &
      "safe_emax#" &
      "safe_first#" &
@@ -418,14 +529,16 @@ package body Snames is
      "small#" &
      "storage_size#" &
      "storage_unit#" &
+     "stream_size#" &
      "tag#" &
+     "target_name#" &
      "terminated#" &
-     "tick#" &
      "to_address#" &
      "type_class#" &
      "uet_address#" &
      "unbiased_rounding#" &
      "unchecked_access#" &
+     "unconstrained_array#" &
      "universal_literal_string#" &
      "unrestricted_access#" &
      "vads_size#" &
@@ -434,6 +547,7 @@ package body Snames is
      "value_size#" &
      "version#" &
      "wchar_t_size#" &
+     "wide_wide_width#" &
      "wide_width#" &
      "width#" &
      "word_size#" &
@@ -442,6 +556,7 @@ package body Snames is
      "copy_sign#" &
      "floor#" &
      "fraction#" &
+     "from_any#" &
      "image#" &
      "input#" &
      "machine#" &
@@ -452,10 +567,14 @@ package body Snames is
      "remainder#" &
      "rounding#" &
      "succ#" &
+     "to_any#" &
      "truncation#" &
+     "typecode#" &
      "value#" &
      "wide_image#" &
+     "wide_wide_image#" &
      "wide_value#" &
+     "wide_wide_value#" &
      "output#" &
      "read#" &
      "write#" &
@@ -464,13 +583,18 @@ package body Snames is
      "storage_pool#" &
      "base#" &
      "class#" &
+     "stub_type#" &
      "ceiling_locking#" &
      "inheritance_locking#" &
      "fifo_queuing#" &
      "priority_queuing#" &
+     "edf_across_priorities#" &
      "fifo_within_priorities#" &
+     "non_preemptive_within_priorities#" &
+     "round_robin_within_priorities#" &
      "access_check#" &
      "accessibility_check#" &
+     "alignment_check#" &
      "discriminant_check#" &
      "division_check#" &
      "elaboration_check#" &
@@ -480,6 +604,7 @@ package body Snames is
      "range_check#" &
      "storage_check#" &
      "tag_check#" &
+     "validity_check#" &
      "all_checks#" &
      "abort#" &
      "abs#" &
@@ -510,7 +635,6 @@ package body Snames is
      "is#" &
      "limited#" &
      "loop#" &
-     "mod#" &
      "new#" &
      "not#" &
      "null#" &
@@ -546,6 +670,7 @@ package body Snames is
      "exception_message#" &
      "exception_name#" &
      "file#" &
+     "generic_dispatching_constructor#" &
      "import_address#" &
      "import_largest_value#" &
      "import_value#" &
@@ -559,6 +684,8 @@ package body Snames is
      "source_location#" &
      "unchecked_conversion#" &
      "unchecked_deallocation#" &
+     "to_pointer#" &
+     "free#" &
      "abstract#" &
      "aliased#" &
      "protected#" &
@@ -566,37 +693,129 @@ package body Snames is
      "requeue#" &
      "tagged#" &
      "raise_exception#" &
-     "project#" &
+     "ada_roots#" &
+     "aggregate#" &
+     "archive_builder#" &
+     "archive_builder_append_option#" &
+     "archive_indexer#" &
+     "archive_suffix#" &
+     "binder#" &
+     "binder_prefix#" &
+     "body_suffix#" &
+     "builder#" &
+     "builder_switches#" &
+     "compiler#" &
+     "compiler_kind#" &
+     "config_body_file_name#" &
+     "config_body_file_name_pattern#" &
+     "config_file_switches#" &
+     "config_file_unique#" &
+     "config_spec_file_name#" &
+     "config_spec_file_name_pattern#" &
+     "configuration#" &
+     "cross_reference#" &
+     "default_language#" &
+     "default_switches#" &
+     "dependency_driver#" &
+     "dependency_file_kind#" &
+     "dependency_switches#" &
+     "driver#" &
+     "excluded_source_dirs#" &
+     "excluded_source_files#" &
+     "excluded_source_list_file#" &
+     "exec_dir#" &
+     "executable#" &
+     "executable_suffix#" &
      "extends#" &
-     "naming#" &
-     "object_dir#" &
-     "source_dirs#" &
-     "specification#" &
+     "externally_built#" &
+     "finder#" &
+     "global_compilation_switches#" &
+     "global_configuration_pragmas#" &
+     "global_config_file#" &
+     "gnatls#" &
+     "gnatstub#" &
      "implementation#" &
-     "specification_exceptions#" &
      "implementation_exceptions#" &
-     "specification_suffix#" &
      "implementation_suffix#" &
-     "separate_suffix#" &
-     "source_files#" &
-     "source_list_file#" &
-     "default_switches#" &
-     "switches#" &
+     "include_switches#" &
+     "include_path#" &
+     "include_path_file#" &
+     "inherit_source_path#" &
+     "language_kind#" &
+     "language_processing#" &
+     "languages#" &
+     "library#" &
+     "library_ali_dir#" &
+     "library_auto_init#" &
+     "library_auto_init_supported#" &
+     "library_builder#" &
      "library_dir#" &
-     "library_name#" &
+     "library_gcc#" &
+     "library_interface#" &
      "library_kind#" &
+     "library_name#" &
+     "library_major_minor_id_supported#" &
+     "library_options#" &
+     "library_partial_linker#" &
+     "library_reference_symbol_file#" &
+     "library_src_dir#" &
+     "library_support#" &
+     "library_symbol_file#" &
+     "library_symbol_policy#" &
      "library_version#" &
-     "library_elaboration#" &
-     "languages#" &
-     "builder#" &
-     "gnatls#" &
-     "cross_reference#" &
-     "finder#" &
-     "binder#" &
+     "library_version_switches#" &
      "linker#" &
-     "compiler#" &
-     "gnatstub#" &
-      "#";
+     "linker_executable_option#" &
+     "linker_lib_dir_option#" &
+     "linker_lib_name_option#" &
+     "local_config_file#" &
+     "local_configuration_pragmas#" &
+     "locally_removed_files#" &
+     "map_file_option#" &
+     "mapping_file_switches#" &
+     "mapping_spec_suffix#" &
+     "mapping_body_suffix#" &
+     "metrics#" &
+     "naming#" &
+     "object_generated#" &
+     "objects_linked#" &
+     "objects_path#" &
+     "objects_path_file#" &
+     "object_dir#" &
+     "path_syntax#" &
+     "pic_option#" &
+     "pretty_printer#" &
+     "prefix#" &
+     "project#" &
+     "roots#" &
+     "required_switches#" &
+     "run_path_option#" &
+     "runtime_project#" &
+     "shared_library_minimum_switches#" &
+     "shared_library_prefix#" &
+     "shared_library_suffix#" &
+     "separate_suffix#" &
+     "source_dirs#" &
+     "source_files#" &
+     "source_list_file#" &
+     "spec#" &
+     "spec_suffix#" &
+     "specification#" &
+     "specification_exceptions#" &
+     "specification_suffix#" &
+     "stack#" &
+     "switches#" &
+     "symbolic_link_supported#" &
+     "sync#" &
+     "synchronize#" &
+     "toolchain_description#" &
+     "toolchain_version#" &
+     "runtime_library_dir#" &
+     "unaligned_valid#" &
+     "interface#" &
+     "overriding#" &
+     "synchronized#" &
+     "#";
 
    ---------------------
    -- Generated Names --
@@ -621,7 +840,6 @@ package body Snames is
    --    xxxE    dispatch table pointer type for tagged type xxx    (Exp_Ch3)
    --    xxxE    parameters for accept body for entry xxx           (Exp_Ch9)
    --    xxxFn   n'th primitive of a tagged type (named xxx)        (Exp_Ch3)
-   --    xxxI    initialization procedure for type xxx              (Exp_Ch3)
    --    xxxJ    tag table type index for tagged type xxx           (Exp_Ch3)
    --    xxxM    master Id value for access type xxx                (Exp_Ch3)
    --    xxxP    tag table pointer type for tagged type xxx         (Exp_Ch3)
@@ -636,11 +854,30 @@ package body Snames is
    --    xxxY    dispatch table type for tagged type xxx            (Exp_Ch3)
    --    xxxZ    size variable for task xxx                         (Exp_Ch9)
 
+   --  TSS names
+
+   --    xxxDA   deep adjust routine for type xxx                   (Exp_TSS)
+   --    xxxDF   deep finalize routine for type xxx                 (Exp_TSS)
+   --    xxxDI   deep initialize routine for type xxx               (Exp_TSS)
+   --    xxxEQ   composite equality routine for record type xxx     (Exp_TSS)
+   --    xxxFA   PolyORB/DSA From_Any converter for type xxx        (Exp_TSS)
+   --    xxxIP   initialization procedure for type xxx              (Exp_TSS)
+   --    xxxRA   RAS type access routine for type xxx               (Exp_TSS)
+   --    xxxRD   RAS type dereference routine for type xxx          (Exp_TSS)
+   --    xxxRP   Rep to Pos conversion for enumeration type xxx     (Exp_TSS)
+   --    xxxSA   array/slice assignment for controlled comp. arrays (Exp_TSS)
+   --    xxxSI   stream input attribute subprogram for type xxx     (Exp_TSS)
+   --    xxxSO   stream output attribute subprogram for type xxx    (Exp_TSS)
+   --    xxxSR   stream read attribute subprogram for type xxx      (Exp_TSS)
+   --    xxxSW   stream write attribute subprogram for type xxx     (Exp_TSS)
+   --    xxxTA   PolyORB/DSA To_Any converter for type xxx          (Exp_TSS)
+   --    xxxTC   PolyORB/DSA Typecode for type xxx                  (Exp_TSS)
+
    --  Implicit type names
 
    --    TxxxT   type of literal table for enumeration type xxx     (Sem_Ch3)
 
-   --  (list not yet complete ???)
+   --  (Note: this list is not complete or accurate ???)
 
    ----------------------
    -- Get_Attribute_Id --
@@ -651,15 +888,6 @@ package body Snames is
       return Attribute_Id'Val (N - First_Attribute_Name);
    end Get_Attribute_Id;
 
-   ------------------
-   -- Get_Check_Id --
-   ------------------
-
-   function Get_Check_Id (N : Name_Id) return Check_Id is
-   begin
-      return Check_Id'Val (N - First_Check_Name);
-   end Get_Check_Id;
-
    -----------------------
    -- Get_Convention_Id --
    -----------------------
@@ -668,23 +896,54 @@ package body Snames is
    begin
       case N is
          when Name_Ada        => return Convention_Ada;
-         when Name_Asm        => return Convention_Assembler;
          when Name_Assembler  => return Convention_Assembler;
          when Name_C          => return Convention_C;
+         when Name_CIL        => return Convention_CIL;
          when Name_COBOL      => return Convention_COBOL;
          when Name_CPP        => return Convention_CPP;
-         when Name_DLL        => return Convention_Stdcall;
          when Name_Fortran    => return Convention_Fortran;
          when Name_Intrinsic  => return Convention_Intrinsic;
          when Name_Java       => return Convention_Java;
          when Name_Stdcall    => return Convention_Stdcall;
          when Name_Stubbed    => return Convention_Stubbed;
-         when Name_Win32      => return Convention_Stdcall;
+
+         --  If no direct match, then we must have a convention
+         --  identifier pragma that has specified this name.
+
          when others          =>
+            for J in 1 .. Convention_Identifiers.Last loop
+               if N = Convention_Identifiers.Table (J).Name then
+                  return Convention_Identifiers.Table (J).Convention;
+               end if;
+            end loop;
+
             raise Program_Error;
       end case;
    end Get_Convention_Id;
 
+   -------------------------
+   -- Get_Convention_Name --
+   -------------------------
+
+   function Get_Convention_Name (C : Convention_Id) return Name_Id is
+   begin
+      case C is
+         when Convention_Ada       => return Name_Ada;
+         when Convention_Assembler => return Name_Assembler;
+         when Convention_C         => return Name_C;
+         when Convention_CIL       => return Name_CIL;
+         when Convention_COBOL     => return Name_COBOL;
+         when Convention_CPP       => return Name_CPP;
+         when Convention_Entry     => return Name_Entry;
+         when Convention_Fortran   => return Name_Fortran;
+         when Convention_Intrinsic => return Name_Intrinsic;
+         when Convention_Java      => return Name_Java;
+         when Convention_Protected => return Name_Protected;
+         when Convention_Stdcall   => return Name_Stdcall;
+         when Convention_Stubbed   => return Name_Stubbed;
+      end case;
+   end Get_Convention_Name;
+
    ---------------------------
    -- Get_Locking_Policy_Id --
    ---------------------------
@@ -702,10 +961,20 @@ package body Snames is
    begin
       if N = Name_AST_Entry then
          return Pragma_AST_Entry;
+      elsif N = Name_Fast_Math then
+         return Pragma_Fast_Math;
+      elsif N = Name_Interface then
+         return Pragma_Interface;
+      elsif N = Name_Priority then
+         return Pragma_Priority;
+      elsif N = Name_Relative_Deadline then
+         return Pragma_Relative_Deadline;
       elsif N = Name_Storage_Size then
          return Pragma_Storage_Size;
       elsif N = Name_Storage_Unit then
          return Pragma_Storage_Unit;
+      elsif N not in First_Pragma_Name .. Last_Pragma_Name then
+         return Unknown_Pragma;
       else
          return Pragma_Id'Val (N - First_Pragma_Name);
       end if;
@@ -724,8 +993,9 @@ package body Snames is
    -- Get_Task_Dispatching_Policy_Id --
    ------------------------------------
 
-   function Get_Task_Dispatching_Policy_Id (N : Name_Id)
-     return Task_Dispatching_Policy_Id is
+   function Get_Task_Dispatching_Policy_Id
+     (N : Name_Id) return Task_Dispatching_Policy_Id
+   is
    begin
       return Task_Dispatching_Policy_Id'Val
         (N - First_Task_Dispatching_Policy_Name);
@@ -741,10 +1011,8 @@ package body Snames is
 
    begin
       P_Index := Preset_Names'First;
-
       loop
          Name_Len := 0;
-
          while Preset_Names (P_Index) /= '#' loop
             Name_Len := Name_Len + 1;
             Name_Buffer (Name_Len) := Preset_Names (P_Index);
@@ -766,6 +1034,22 @@ package body Snames is
       --  properly matching version of the body.
 
       pragma Assert (Discard_Name = Last_Predefined_Name);
+
+      --  Initialize the convention identifiers table with the standard
+      --  set of synonyms that we recognize for conventions.
+
+      Convention_Identifiers.Init;
+
+      Convention_Identifiers.Append ((Name_Asm,         Convention_Assembler));
+      Convention_Identifiers.Append ((Name_Assembly,    Convention_Assembler));
+
+      Convention_Identifiers.Append ((Name_Default,     Convention_C));
+      Convention_Identifiers.Append ((Name_External,    Convention_C));
+
+      Convention_Identifiers.Append ((Name_C_Plus_Plus, Convention_CPP));
+
+      Convention_Identifiers.Append ((Name_DLL,         Convention_Stdcall));
+      Convention_Identifiers.Append ((Name_Win32,       Convention_Stdcall));
    end Initialize;
 
    -----------------------
@@ -777,14 +1061,15 @@ package body Snames is
       return N in First_Attribute_Name .. Last_Attribute_Name;
    end Is_Attribute_Name;
 
-   -------------------
-   -- Is_Check_Name --
-   -------------------
+   ----------------------------------
+   -- Is_Configuration_Pragma_Name --
+   ----------------------------------
 
-   function Is_Check_Name (N : Name_Id) return Boolean is
+   function Is_Configuration_Pragma_Name (N : Name_Id) return Boolean is
    begin
-      return N in First_Check_Name .. Last_Check_Name;
-   end Is_Check_Name;
+      return N in First_Pragma_Name .. Last_Configuration_Pragma_Name
+        or else N = Name_Fast_Math;
+   end Is_Configuration_Pragma_Name;
 
    ------------------------
    -- Is_Convention_Name --
@@ -792,8 +1077,24 @@ package body Snames is
 
    function Is_Convention_Name (N : Name_Id) return Boolean is
    begin
-      return N in First_Convention_Name .. Last_Convention_Name
-        or else N = Name_C;
+      --  Check if this is one of the standard conventions
+
+      if N in First_Convention_Name .. Last_Convention_Name
+        or else N = Name_C
+      then
+         return True;
+
+      --  Otherwise check if it is in convention identifier table
+
+      else
+         for J in 1 .. Convention_Identifiers.Last loop
+            if N = Convention_Identifiers.Table (J).Name then
+               return True;
+            end if;
+         end loop;
+
+         return False;
+      end if;
    end Is_Convention_Name;
 
    ------------------------------
@@ -816,6 +1117,19 @@ package body Snames is
           Last_Renamable_Function_Attribute;
    end Is_Function_Attribute_Name;
 
+   ---------------------
+   -- Is_Keyword_Name --
+   ---------------------
+
+   function Is_Keyword_Name (N : Name_Id) return Boolean is
+   begin
+      return Get_Name_Table_Byte (N) /= 0
+        and then (Ada_Version >= Ada_95
+                  or else N not in Ada_95_Reserved_Words)
+        and then (Ada_Version >= Ada_05
+                  or else N not in Ada_2005_Reserved_Words);
+   end Is_Keyword_Name;
+
    ----------------------------
    -- Is_Locking_Policy_Name --
    ----------------------------
@@ -842,6 +1156,10 @@ package body Snames is
    begin
       return N in First_Pragma_Name .. Last_Pragma_Name
         or else N = Name_AST_Entry
+        or else N = Name_Fast_Math
+        or else N = Name_Interface
+        or else N = Name_Relative_Deadline
+        or else N = Name_Priority
         or else N = Name_Storage_Size
         or else N = Name_Storage_Unit;
    end Is_Pragma_Name;
@@ -883,4 +1201,16 @@ package body Snames is
       return N in First_Type_Attribute_Name .. Last_Type_Attribute_Name;
    end Is_Type_Attribute_Name;
 
+   ----------------------------------
+   -- Record_Convention_Identifier --
+   ----------------------------------
+
+   procedure Record_Convention_Identifier
+     (Id         : Name_Id;
+      Convention : Convention_Id)
+   is
+   begin
+      Convention_Identifiers.Append ((Id, Convention));
+   end Record_Convention_Identifier;
+
 end Snames;