From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt1-x836.google.com (mail-qt1-x836.google.com [IPv6:2607:f8b0:4864:20::836]) by sourceware.org (Postfix) with ESMTPS id 4BAAC3858012 for ; Wed, 18 Nov 2020 18:36:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 4BAAC3858012 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=acm.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=nathanmsidwell@gmail.com Received: by mail-qt1-x836.google.com with SMTP id f93so2350843qtb.10 for ; Wed, 18 Nov 2020 10:36:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=e23B/g2LuJt7qDPf8L7g53MvxUh+eiy8R+8E94wnQPY=; b=Xj+xT14GUheijehAAC0fNuq0zXjd4xr8Qp3ZZ4N3fblTfHAmFjSqUlTOGy00MnbkeA RSok//7F+dzcYmkRT7IE9CPAjo2sboWQLz2WbzAUToS/AH5dGsTnNxevA1kjm1P7/hlJ w5rW17D+U0fV+qx7A/UFIhB+Bmh0M1EjOGwxVhYru9p/iqhDlpKsQ89a0Sai1U8IGaXm WXoyfjQoB7Sh0ygKEcAXSySCc6/NLd7W61UgYGh0uX2yEIKImRRJnWKJVApLLCDNzDxR t/HIgYzlPxjsZDDwgyc3JnBZJPYAxmHZWyc+cSWfirigBrsS2h0nJI+nI0EgIbmVKvlI qSNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language; bh=e23B/g2LuJt7qDPf8L7g53MvxUh+eiy8R+8E94wnQPY=; b=I/iUQqn5OydUpXLIG6npYVAp6/R2qGbxbNRHFww5drPjHcactyLe3C2jsh0jGqdhia /FaEPzpbYCPLpuXnL2EWC0Dd/Qjr6icuJ/r2YlMzT815r2SJXui8Xg3QP+IbjixQ3/sH VVu2wzsfbcClIAWHBBbvxNbnYgPDsDnxiBulyAOyYZDZjNlHJzIJ0Y9W+FNzXluDl5gm Kt2Jf8zM27SPFOILelG13qax9AXT5KCjGopo2WuIGTlFIPv2s3tA0YKLSIGNDVSyXudE UUA0dHGA66E180vv4BWt/0BdsflZtUTjqmR3pO1BL/IO7OHStV+qyxqrudq/ZdXxxwYe P7DQ== X-Gm-Message-State: AOAM532f6/3z9MPH2LSpUAMV6cvMUTSemUL4tormn2367KWZG5VngB7m aE/WAYaF7dpytl0q5phKLoA= X-Google-Smtp-Source: ABdhPJxiks6sDZL8nkA8zf6Rvugs1TxD+DyU9tuDnrPMkzb84z2Dh5FIbnx+caIyfc4OmCLHzghJmQ== X-Received: by 2002:ac8:754a:: with SMTP id b10mr6232588qtr.15.1605724601629; Wed, 18 Nov 2020 10:36:41 -0800 (PST) Received: from ?IPv6:2620:10d:c0a8:1102:c9a3:8f77:5bdf:84a1? ([2620:10d:c091:480::1:e672]) by smtp.googlemail.com with ESMTPSA id a23sm17045727qtk.82.2020.11.18.10.36.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 18 Nov 2020 10:36:40 -0800 (PST) Sender: Nathan Sidwell Subject: Re: [32/32] fixinclude To: GCC Patches Cc: David Edelsohn , Richard Biener References: <7fc9e868-3db9-4972-ed67-6ff249f549c3@acm.org> <1ab99df5-3997-0895-c979-f8529f476df7@acm.org> <97e9477b-7173-b7f9-a884-616b972c57ba@acm.org> <01f091a5-cd8b-60b6-9552-2318ecd07025@acm.org> <5c533ebe-440d-188e-5bdb-38c14898852c@acm.org> <9e6ec23c-6b36-de70-7630-55562583696f@acm.org> <3d138aa4-df19-df5d-54c6-ec7299749f0f@acm.org> <0a62f316-7c23-3492-f7c3-9c1653a61a75@acm.org> <9779964c-320a-59c9-3a5a-72186cbc6962@acm.org> From: Nathan Sidwell Message-ID: <4fd6ef17-9b2b-448a-adba-ec14228b64d1@acm.org> Date: Wed, 18 Nov 2020 13:36:37 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="------------3EB2D3DE63B78E5C1AC6AB3E" Content-Language: en-US X-Spam-Status: No, score=-11.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Nov 2020 18:36:43 -0000 This is a multi-part message in MIME format. --------------3EB2D3DE63B78E5C1AC6AB3E Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit This is what I've pushed. This fixes an ODR violation in the AIX headers that is detected by C++ modules. While unnamed structs with typedef names for linkage purposes are accepted, this case is an anonymous struct without such a typedef name -- the typedef is attached to the pointer-to-struct type. Fixed by naming the struct. fixincludes/ * inclhack.def (aix_physaddr_t): New. * fixincl.x: Regenerated. nathan -- Nathan Sidwell --------------3EB2D3DE63B78E5C1AC6AB3E Content-Type: text/x-patch; charset=UTF-8; name="32-aix-fixincl.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="32-aix-fixincl.diff" diff --git c/fixincludes/fixincl.x w/fixincludes/fixincl.x index 758d5620641..21439652bce 100644 --- c/fixincludes/fixincl.x +++ w/fixincludes/fixincl.x @@ -2,11 +2,11 @@ * * DO NOT EDIT THIS FILE (fixincl.x) * - * It has been AutoGen-ed October 3, 2020 at 11:40:52 PM by AutoGen 5.18 + * It has been AutoGen-ed October 21, 2020 at 10:43:22 AM by AutoGen 5.18.16 * From the definitions inclhack.def * and the template file fixincl */ -/* DO NOT SVN-MERGE THIS FILE, EITHER Sat Oct 3 23:40:52 UTC 2020 +/* DO NOT SVN-MERGE THIS FILE, EITHER Wed Oct 21 10:43:22 EDT 2020 * * You must regenerate it. Use the ./genfixes script. * @@ -15,7 +15,7 @@ * certain ANSI-incompatible system header files which are fixed to work * correctly with ANSI C and placed in a directory that GNU C will search. * - * This file contains 259 fixup descriptions. + * This file contains 260 fixup descriptions. * * See README for more information. * @@ -1247,6 +1247,43 @@ static const char* apzAix_Rwlock_Initializer_1Patch[] = { {{ \\\n", (char*)NULL }; +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Aix_Physadr_T fix + */ +tSCC zAix_Physadr_TName[] = + "aix_physadr_t"; + +/* + * File name selection pattern + */ +tSCC zAix_Physadr_TList[] = + "sys/types.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzAix_Physadr_TMachs[] = { + "*-*-aix*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zAix_Physadr_TSelect0[] = + "typedef[ \t]*struct[ \t]*([{][^}]*[}][ \t]*\\*[ \t]*physadr_t;)"; + +#define AIX_PHYSADR_T_TEST_CT 1 +static tTestDesc aAix_Physadr_TTests[] = { + { TT_EGREP, zAix_Physadr_TSelect0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Aix_Physadr_T + */ +static const char* apzAix_Physadr_TPatch[] = { + "format", + "typedef struct __physadr_s %1", + (char*)NULL }; + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * Description of Aix_Pthread fix @@ -10521,9 +10558,9 @@ static const char* apzX11_SprintfPatch[] = { * * List of all fixes */ -#define REGEX_COUNT 297 +#define REGEX_COUNT 298 #define MACH_LIST_SIZE_LIMIT 187 -#define FIX_COUNT 259 +#define FIX_COUNT 260 /* * Enumerate the fixes @@ -10555,6 +10592,7 @@ typedef enum { AIX_MUTEX_INITIALIZER_1_FIXIDX, AIX_COND_INITIALIZER_1_FIXIDX, AIX_RWLOCK_INITIALIZER_1_FIXIDX, + AIX_PHYSADR_T_FIXIDX, AIX_PTHREAD_FIXIDX, AIX_STDINT_1_FIXIDX, AIX_STDINT_2_FIXIDX, @@ -10921,6 +10959,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = { AIX_RWLOCK_INITIALIZER_1_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aAix_Rwlock_Initializer_1Tests, apzAix_Rwlock_Initializer_1Patch, 0 }, + { zAix_Physadr_TName, zAix_Physadr_TList, + apzAix_Physadr_TMachs, + AIX_PHYSADR_T_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aAix_Physadr_TTests, apzAix_Physadr_TPatch, 0 }, + { zAix_PthreadName, zAix_PthreadList, apzAix_PthreadMachs, AIX_PTHREAD_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, diff --git c/fixincludes/inclhack.def w/fixincludes/inclhack.def index 47eb236586c..80c9adfb07c 100644 --- c/fixincludes/inclhack.def +++ w/fixincludes/inclhack.def @@ -720,6 +720,20 @@ fix = { "{ \\\\\n"; }; + +/* On AIX 'typedef struct {} * physadr_t;' needs to give the struct a + name for linkage purposes. Fortunately it is on exactly one + line. */ +fix = { + hackname = aix_physadr_t; + mach = "*-*-aix*"; + files = sys/types.h; + select = "typedef[ \t]*struct[ \t]*([{][^}]*[}][ \t]*\\*[ \t]*physadr_t;)"; + c_fix = format; + c_fix_arg = "typedef struct __physadr_s %1"; + test_text = "typedef struct __physadr_s {"; +}; + /* * pthread.h on AIX 4.3.3 tries to define a macro without whitspace * which violates a requirement of ISO C. --------------3EB2D3DE63B78E5C1AC6AB3E--