From patchwork Sat Jul 7 10:46:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Botcazou X-Patchwork-Id: 940791 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-481157-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=adacore.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="P7YPQ9wf"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41N7Z9058qz9s0n for ; Sat, 7 Jul 2018 20:46:39 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=CdrhAA1PWXIoUPcv DX0wnBn6BmKN7898IvNfHrjiFCQ+pScmfyo9UGlUPjJ8DluySuMsGZhpXuHViL/j PDbEVlFX1nxpPmRB8lWfA4YT7bSieTjL7HUF+jDnPxQgCGtt8nKZFtXFrq9mexAi w+6J73s9rVB/ySy6yNWLuODWPbE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=default; bh=M5ukwScLkQLzbwt7fej1I/ B7Ji0=; b=P7YPQ9wf/TjtspBp0OH8kwVgMykFbxcRxQlNmcbjpXD/uLZtzLdo1N y9RP3S4LBMfdUoUt4gxO//q9ULD/o1yuwkVECkWBPPe60IxZjo1FfUxbLvCj4EFK 9N5AB1lJFmvVt4bjmm/58W84WH2ynWUd0s5qCq4CwW6mQenEqiyH4= Received: (qmail 123461 invoked by alias); 7 Jul 2018 10:46:31 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 123445 invoked by uid 89); 7 Jul 2018 10:46:30 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-14.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=lieu, identifier_node, IDENTIFIER_NODE, 23367 X-HELO: smtp.eu.adacore.com Received: from mel.act-europe.fr (HELO smtp.eu.adacore.com) (194.98.77.210) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 07 Jul 2018 10:46:27 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 813BF82259 for ; Sat, 7 Jul 2018 12:46:25 +0200 (CEST) Received: from smtp.eu.adacore.com ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4oxXTr1EHa3B for ; Sat, 7 Jul 2018 12:46:25 +0200 (CEST) Received: from polaris.localnet (bon31-6-88-161-99-133.fbx.proxad.net [88.161.99.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.eu.adacore.com (Postfix) with ESMTPSA id 339578223C for ; Sat, 7 Jul 2018 12:46:25 +0200 (CEST) From: Eric Botcazou To: gcc-patches@gcc.gnu.org Subject: [c-family] Swich -fdump-ada-spec output for Ada 2012 Date: Sat, 07 Jul 2018 12:46:24 +0200 Message-ID: <2436822.zejoBebs4b@polaris> MIME-Version: 1.0 The aspect syntax introduced in Ada 2012 makes it much easier to support function overloading in particular, so the patch removes a lot of lines: c-ada-spec.c | 322 ++++++++++++++++++--------------------------------------- 1 file changed, 105 insertions(+), 217 deletions(-) Tested on x86-64/Linux, applied on the mainline. 2018-07-07 Eric Botcazou * c-ada-spec.c (to_ada_name): Remove index parameter. (pp_ada_tree_identifier): Likewise. (dump_ada_macros): Adjust call to to_ada_name. (struct overloaded_name_hash): Delete. (struct overloaded_name_hasher): Likewise. (overloaded_names): Likewise. (compute_overloading_index): Likewise. (dump_ada_decl_name): Do not call compute_overloading_index and adjust calls to pp_ada_tree_identifier. (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier. (dump_ada_import): Add spc parameter and switch to aspect syntax. (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier. (dump_ada_enum_type): Remove type and display_convention parameters. Adjust calls to pp_ada_tree_identifier. (dump_ada_node): Likewise and for dump_ada_structure. (dump_nested_type) : Adjust call to dump_ada_enum_type and tidy up. : Adjust call to dump_ada_structure and switch to aspect syntax. (print_constructor): Adjust call to pp_ada_tree_identifier. (print_destructor): Likewise. (dump_ada_declaration): Switch to aspect syntax. (dump_ada_structure): Likewise and tidy up. Replace display_convention parameter with nested parameter. (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005. (dump_ada_specs): Do not delete overloaded_names table. Index: c-ada-spec.c =================================================================== --- c-ada-spec.c (revision 262468) +++ c-ada-spec.c (working copy) @@ -34,8 +34,8 @@ along with GCC; see the file COPYING3. /* Local functions, macros and variables. */ static int dump_ada_node (pretty_printer *, tree, tree, int, bool, bool); static int dump_ada_declaration (pretty_printer *, tree, tree, int); -static void dump_ada_structure (pretty_printer *, tree, tree, int, bool); -static char *to_ada_name (const char *, unsigned int, bool *); +static void dump_ada_structure (pretty_printer *, tree, tree, bool, int); +static char *to_ada_name (const char *, bool *); #define INDENT(SPACE) \ do { int i; for (i = 0; i homonyms; -}; - -struct overloaded_name_hasher : delete_ptr_hash -{ - static inline hashval_t hash (overloaded_name_hash *t) - { return t->hash; } - static inline bool equal (overloaded_name_hash *a, overloaded_name_hash *b) - { return a->name == b->name && a->context == b->context; } -}; - -static hash_table *overloaded_names; - -/* Compute the overloading index of function DECL in its context. */ - -static unsigned int -compute_overloading_index (tree decl) -{ - const hashval_t hashcode - = iterative_hash_hashval_t (htab_hash_pointer (DECL_NAME (decl)), - htab_hash_pointer (DECL_CONTEXT (decl))); - struct overloaded_name_hash in, *h, **slot; - unsigned int index, *iter; - - if (!overloaded_names) - overloaded_names = new hash_table (512); - - /* Look up the list of homonyms in the table. */ - in.hash = hashcode; - in.name = DECL_NAME (decl); - in.context = DECL_CONTEXT (decl); - slot = overloaded_names->find_slot_with_hash (&in, hashcode, INSERT); - if (*slot) - h = *slot; - else - { - h = new overloaded_name_hash; - h->hash = hashcode; - h->name = DECL_NAME (decl); - h->context = DECL_CONTEXT (decl); - h->homonyms.create (0); - *slot = h; - } - - /* Look up the function in the list of homonyms. */ - FOR_EACH_VEC_ELT (h->homonyms, index, iter) - if (*iter == DECL_UID (decl)) - break; - - /* If it is not present, push it onto the list. */ - if (!iter) - h->homonyms.safe_push (DECL_UID (decl)); - - return index; -} - /* Dump in BUFFER the name of a DECL node if set, in Ada syntax. LIMITED_ACCESS indicates whether NODE can be accessed via a limited 'with' clause rather than a regular 'with' clause. */ @@ -1519,13 +1450,7 @@ static void dump_ada_decl_name (pretty_printer *buffer, tree decl, bool limited_access) { if (DECL_NAME (decl)) - { - const unsigned int index - = (TREE_CODE (decl) == FUNCTION_DECL && cpp_check) - ? compute_overloading_index (decl) : 0; - pp_ada_tree_identifier (buffer, DECL_NAME (decl), decl, index, - limited_access); - } + pp_ada_tree_identifier (buffer, DECL_NAME (decl), decl, limited_access); else { tree type_name = TYPE_NAME (TREE_TYPE (decl)); @@ -1539,7 +1464,7 @@ dump_ada_decl_name (pretty_printer *buff pp_scalar (buffer, "%d", TYPE_UID (TREE_TYPE (decl))); } else if (TREE_CODE (type_name) == IDENTIFIER_NODE) - pp_ada_tree_identifier (buffer, type_name, decl, 0, limited_access); + pp_ada_tree_identifier (buffer, type_name, decl, limited_access); } } @@ -1549,7 +1474,7 @@ static void dump_ada_double_name (pretty_printer *buffer, tree t1, tree t2) { if (DECL_NAME (t1)) - pp_ada_tree_identifier (buffer, DECL_NAME (t1), t1, 0, false); + pp_ada_tree_identifier (buffer, DECL_NAME (t1), t1, false); else { pp_string (buffer, "anon"); @@ -1559,7 +1484,7 @@ dump_ada_double_name (pretty_printer *bu pp_underscore (buffer); if (DECL_NAME (t2)) - pp_ada_tree_identifier (buffer, DECL_NAME (t2), t2, 0, false); + pp_ada_tree_identifier (buffer, DECL_NAME (t2), t2, false); else { pp_string (buffer, "anon"); @@ -1586,32 +1511,38 @@ dump_ada_double_name (pretty_printer *bu } } -/* Dump in BUFFER pragma Import C/CPP on a given node T. */ +/* Dump in BUFFER aspect Import on a given node T. SPC is the current + indentation level. */ static void -dump_ada_import (pretty_printer *buffer, tree t) +dump_ada_import (pretty_printer *buffer, tree t, int spc) { const char *name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (t)); const bool is_stdcall = TREE_CODE (t) == FUNCTION_DECL && lookup_attribute ("stdcall", TYPE_ATTRIBUTES (TREE_TYPE (t))); + pp_string (buffer, "with Import => True, "); + + newline_and_indent (buffer, spc + 5); + if (is_stdcall) - pp_string (buffer, "pragma Import (Stdcall, "); + pp_string (buffer, "Convention => Stdcall, "); else if (name[0] == '_' && name[1] == 'Z') - pp_string (buffer, "pragma Import (CPP, "); + pp_string (buffer, "Convention => CPP, "); else - pp_string (buffer, "pragma Import (C, "); + pp_string (buffer, "Convention => C, "); - dump_ada_decl_name (buffer, t, false); - pp_string (buffer, ", \""); + newline_and_indent (buffer, spc + 5); + + pp_string (buffer, "External_Name => \""); if (is_stdcall) pp_string (buffer, IDENTIFIER_POINTER (DECL_NAME (t))); else pp_asm_name (buffer, t); - pp_string (buffer, "\");"); + pp_string (buffer, "\";"); } /* Check whether T and its type have different names, and append "the_" @@ -1717,7 +1648,7 @@ dump_ada_function_declaration (pretty_pr if (DECL_NAME (arg)) { check_name (buffer, arg); - pp_ada_tree_identifier (buffer, DECL_NAME (arg), NULL_TREE, 0, + pp_ada_tree_identifier (buffer, DECL_NAME (arg), NULL_TREE, false); pp_string (buffer, " : "); } @@ -2022,13 +1953,11 @@ is_simple_enum (tree node) return true; } -/* Dump in BUFFER an enumeral type NODE of type TYPE in Ada syntax. SPC is - the indentation level. If DISPLAY_CONVENTION is true, also print the - pragma Convention for NODE. */ +/* Dump in BUFFER an enumeral type NODE in Ada syntax. SPC is the indentation + level. */ static void -dump_ada_enum_type (pretty_printer *buffer, tree node, tree type, int spc, - bool display_convention) +dump_ada_enum_type (pretty_printer *buffer, tree node, int spc) { if (is_simple_enum (node)) { @@ -2046,19 +1975,12 @@ dump_ada_enum_type (pretty_printer *buff newline_and_indent (buffer, spc); } - pp_ada_tree_identifier (buffer, TREE_PURPOSE (value), node, 0, false); + pp_ada_tree_identifier (buffer, TREE_PURPOSE (value), node, false); } - pp_string (buffer, ");"); + pp_string (buffer, ")"); spc -= INDENT_INCR; newline_and_indent (buffer, spc); - - if (display_convention) - { - pp_string (buffer, "pragma Convention (C, "); - dump_ada_node (buffer, DECL_NAME (type) ? type : TYPE_NAME (node), - type, spc, false, true); - pp_right_paren (buffer); - } + pp_string (buffer, "with Convention => C"); } else { @@ -2071,7 +1993,7 @@ dump_ada_enum_type (pretty_printer *buff pp_semicolon (buffer); newline_and_indent (buffer, spc); - pp_ada_tree_identifier (buffer, TREE_PURPOSE (value), node, 0, false); + pp_ada_tree_identifier (buffer, TREE_PURPOSE (value), node, false); pp_string (buffer, " : constant "); if (TYPE_UNSIGNED (node)) @@ -2110,7 +2032,7 @@ dump_ada_node (pretty_printer *buffer, t return 0; case IDENTIFIER_NODE: - pp_ada_tree_identifier (buffer, node, type, 0, limited_access); + pp_ada_tree_identifier (buffer, node, type, limited_access); break; case TREE_LIST: @@ -2149,7 +2071,7 @@ dump_ada_node (pretty_printer *buffer, t if (name_only) dump_ada_node (buffer, TYPE_NAME (node), node, spc, false, true); else - dump_ada_enum_type (buffer, node, type, spc, true); + dump_ada_enum_type (buffer, node, spc); break; case REAL_TYPE: @@ -2171,7 +2093,7 @@ dump_ada_node (pretty_printer *buffer, t if (TYPE_NAME (node)) { if (TREE_CODE (TYPE_NAME (node)) == IDENTIFIER_NODE) - pp_ada_tree_identifier (buffer, TYPE_NAME (node), node, 0, + pp_ada_tree_identifier (buffer, TYPE_NAME (node), node, limited_access); else if (TREE_CODE (TYPE_NAME (node)) == TYPE_DECL && DECL_NAME (TYPE_NAME (node))) @@ -2215,14 +2137,11 @@ dump_ada_node (pretty_printer *buffer, t spc + INDENT_INCR); /* If we are dumping the full type, it means we are part of a - type definition and need also a Convention C pragma. */ + type definition and need also a Convention C aspect. */ if (!name_only) { - pp_semicolon (buffer); newline_and_indent (buffer, spc); - pp_string (buffer, "pragma Convention (C, "); - dump_ada_node (buffer, type, NULL_TREE, spc, false, true); - pp_right_paren (buffer); + pp_string (buffer, "with Convention => C"); } } else @@ -2336,7 +2255,7 @@ dump_ada_node (pretty_printer *buffer, t dump_ada_node (buffer, TYPE_NAME (node), node, spc, limited_access, true); else - dump_ada_structure (buffer, node, type, spc, true); + dump_ada_structure (buffer, node, type, false, spc); break; case INTEGER_CST: @@ -2607,23 +2526,9 @@ dump_nested_type (pretty_printer *buffer else dump_ada_double_name (buffer, parent, field); pp_string (buffer, " is "); - dump_ada_enum_type (buffer, field_type, t, spc, false); - - if (is_simple_enum (field_type)) - { - pp_string (buffer, "pragma Convention (C, "); - if (TYPE_NAME (field_type)) - dump_ada_node (buffer, field_type, NULL_TREE, spc, false, true); - else - dump_ada_double_name (buffer, parent, field); - pp_string (buffer, ");"); - newline_and_indent (buffer, spc); - } - else - { - pp_semicolon (buffer); - newline_and_indent (buffer, spc); - } + dump_ada_enum_type (buffer, field_type, spc); + pp_semicolon (buffer); + newline_and_indent (buffer, spc); break; case RECORD_TYPE: @@ -2641,25 +2546,19 @@ dump_nested_type (pretty_printer *buffer pp_string (buffer, " (discr : unsigned := 0)"); pp_string (buffer, " is "); - dump_ada_structure (buffer, field_type, t, spc, false); + dump_ada_structure (buffer, field_type, t, true, spc); - pp_string (buffer, "pragma Convention (C_Pass_By_Copy, "); - if (TYPE_NAME (field_type)) - dump_ada_node (buffer, field_type, NULL_TREE, spc, false, true); - else - dump_ada_double_name (buffer, parent, field); - pp_string (buffer, ");"); - newline_and_indent (buffer, spc); + pp_string (buffer, "with Convention => C_Pass_By_Copy"); if (TREE_CODE (field_type) == UNION_TYPE) { - pp_string (buffer, "pragma Unchecked_Union ("); - if (TYPE_NAME (field_type)) - dump_ada_node (buffer, field_type, NULL_TREE, spc, false, true); - else - dump_ada_double_name (buffer, parent, field); - pp_string (buffer, ");"); + pp_comma (buffer); + newline_and_indent (buffer, spc + 5); + pp_string (buffer, "Unchecked_Union => True"); } + + pp_semicolon (buffer); + newline_and_indent (buffer, spc); break; default: @@ -2675,7 +2574,7 @@ print_constructor (pretty_printer *buffe tree decl_name = DECL_NAME (TYPE_NAME (type)); pp_string (buffer, "New_"); - pp_ada_tree_identifier (buffer, decl_name, t, 0, false); + pp_ada_tree_identifier (buffer, decl_name, t, false); } /* Dump in BUFFER destructor spec corresponding to T. */ @@ -2686,7 +2585,7 @@ print_destructor (pretty_printer *buffer tree decl_name = DECL_NAME (TYPE_NAME (type)); pp_string (buffer, "Delete_"); - pp_ada_tree_identifier (buffer, decl_name, t, 0, false); + pp_ada_tree_identifier (buffer, decl_name, t, false); } /* Return the name of type T. */ @@ -2981,33 +2880,33 @@ dump_ada_declaration (pretty_printer *bu if (is_abstract || is_abstract_class) pp_string (buffer, " is abstract"); - pp_semicolon (buffer); - pp_string (buffer, " -- "); - dump_sloc (buffer, t); - if (is_abstract || !DECL_ASSEMBLER_NAME (t)) - return 1; - - newline_and_indent (buffer, spc); - - if (is_constructor) { + pp_semicolon (buffer); + pp_string (buffer, " -- "); + dump_sloc (buffer, t); + } + else if (is_constructor) + { + pp_semicolon (buffer); + pp_string (buffer, " -- "); + dump_sloc (buffer, t); + + newline_and_indent (buffer, spc); pp_string (buffer, "pragma CPP_Constructor ("); print_constructor (buffer, t, type); pp_string (buffer, ", \""); pp_asm_name (buffer, t); pp_string (buffer, "\");"); } - else if (is_destructor) + else { - pp_string (buffer, "pragma Import (CPP, "); - print_destructor (buffer, t, type); - pp_string (buffer, ", \""); - pp_asm_name (buffer, t); - pp_string (buffer, "\");"); + pp_string (buffer, " -- "); + dump_sloc (buffer, t); + + newline_and_indent (buffer, spc); + dump_ada_import (buffer, t, spc); } - else - dump_ada_import (buffer, t); return 1; } @@ -3062,13 +2961,12 @@ dump_ada_declaration (pretty_printer *bu TREE_VISITED (t) = 1; if (is_interface) { - pp_string (buffer, "limited interface; -- "); + pp_string (buffer, "limited interface -- "); dump_sloc (buffer, t); newline_and_indent (buffer, spc); - pp_string (buffer, "pragma Import (CPP, "); - dump_ada_node (buffer, TYPE_NAME (TREE_TYPE (t)), type, spc, false, - true); - pp_right_paren (buffer); + pp_string (buffer, "with Import => True,"); + newline_and_indent (buffer, spc + 5); + pp_string (buffer, "Convention => CPP"); dump_ada_methods (buffer, TREE_TYPE (t), spc); } @@ -3152,28 +3050,29 @@ dump_ada_declaration (pretty_printer *bu /* All needed indentation/newline performed already, so return 0. */ return 0; } - else + else if (is_var) { - pp_string (buffer, "; -- "); + pp_string (buffer, " -- "); dump_sloc (buffer, t); + newline_and_indent (buffer, spc); + dump_ada_import (buffer, t, spc); } - if (is_var) + else { - newline_and_indent (buffer, spc); - dump_ada_import (buffer, t); + pp_string (buffer, "; -- "); + dump_sloc (buffer, t); } return 1; } -/* Dump in BUFFER a structure NODE of type TYPE: name, fields, and methods - in Ada syntax. SPC is the indentation level. If DISPLAY_CONVENTION is - true, also print the pragma Convention for NODE. */ +/* Dump in BUFFER a structure NODE of type TYPE in Ada syntax. If NESTED is + true, it's an anonymous nested type. SPC is the indentation level. */ static void -dump_ada_structure (pretty_printer *buffer, tree node, tree type, int spc, - bool display_convention) +dump_ada_structure (pretty_printer *buffer, tree node, tree type, bool nested, + int spc) { const bool is_union = (TREE_CODE (node) == UNION_TYPE); char buf[32]; @@ -3268,45 +3167,35 @@ dump_ada_structure (pretty_printer *buff } INDENT (spc); - pp_string (buffer, "end record;"); + pp_string (buffer, "end record"); newline_and_indent (buffer, spc); - if (!display_convention) + /* We disregard the methods for anonymous nested types. */ + if (nested) return; - if (RECORD_OR_UNION_TYPE_P (TREE_TYPE (type))) + if (has_nontrivial_methods (node)) { - if (has_nontrivial_methods (TREE_TYPE (type))) - pp_string (buffer, "pragma Import (CPP, "); - else - pp_string (buffer, "pragma Convention (C_Pass_By_Copy, "); + pp_string (buffer, "with Import => True,"); + newline_and_indent (buffer, spc + 5); + pp_string (buffer, "Convention => CPP"); } else - pp_string (buffer, "pragma Convention (C, "); - - package_prefix = false; - dump_ada_node (buffer, TREE_TYPE (type), type, spc, false, true); - package_prefix = true; - pp_right_paren (buffer); + pp_string (buffer, "with Convention => C_Pass_By_Copy"); if (is_union) { - pp_semicolon (buffer); - newline_and_indent (buffer, spc); - pp_string (buffer, "pragma Unchecked_Union ("); - - dump_ada_node (buffer, TREE_TYPE (type), type, spc, false, true); - pp_right_paren (buffer); + pp_comma (buffer); + newline_and_indent (buffer, spc + 5); + pp_string (buffer, "Unchecked_Union => True"); } if (bitfield_used) { - pp_semicolon (buffer); - newline_and_indent (buffer, spc); - pp_string (buffer, "pragma Pack ("); - dump_ada_node (buffer, TREE_TYPE (type), type, spc, false, true); - pp_right_paren (buffer); + pp_comma (buffer); + newline_and_indent (buffer, spc + 5); + pp_string (buffer, "Pack => True"); bitfield_used = false; } @@ -3377,9 +3266,9 @@ dump_ads (const char *source_file, cpp_check = check; dump_ada_nodes (&pp, source_file); - /* Requires Ada 2005 syntax, so generate corresponding pragma. + /* We require Ada 2012 syntax, so generate corresponding pragma. Also, disable style checks since this file is auto-generated. */ - fprintf (f, "pragma Ada_2005;\npragma Style_Checks (Off);\n\n"); + fprintf (f, "pragma Ada_2012;\npragma Style_Checks (Off);\n\n"); /* Dump withs. */ dump_ada_withs (f); @@ -3445,5 +3334,4 @@ dump_ada_specs (void (*collect_all_refs) /* Free various tables. */ free (source_refs); - delete overloaded_names; }