From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) by sourceware.org (Postfix) with ESMTPS id B0435385BAC0 for ; Thu, 21 Jul 2022 18:18:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B0435385BAC0 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f47.google.com with SMTP id bk26so3403370wrb.11 for ; Thu, 21 Jul 2022 11:18:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=G9OZAn8WA3CUyjiCCONal0pQIrUz6mUxuXL/kHIfUkI=; b=RZVRhZDUJRetc4GHhFq4wz36BsiQTrmKUlZHybWpEVJ7PL/4QlWY7kQD8/wuwV2i/M Ndy2iDTtP7Q/AypX/fLXzd41NHU+E69l8AuqX7AJ1ScVMuDtMI7z+s+Gs0+XIKB5LixA z6FPRWSi2pqd+hFVxexYAqLYvBWk5YMFlk79PJXwDuvcEW1IIKjsLGVkkIHf5DZR4p1f nz+upeL3I/VFBX4WPrhlxQKVSNXuCYDw51S0Hn3kMFKXQuVRVUTkldgOAUScG86yJXO1 ASTB1f/44jvF9WYSEN2JblcBQfj3Nyjy5g8K/qnup5phChEU8PQLoiOsYQX33ja6UkiG D91A== X-Gm-Message-State: AJIora+PZQulj9otfZCtn0iNSoV8xRUOWk2/0XJPVrxBYDQ9j8MaVTOF SXQBmyB5f8GCdh/2b3rwc+J3lLSn0GA= X-Google-Smtp-Source: AGRyM1soL9mr3Z9vuUEVS4VZc2poX2wHK3M8F8YTI3xXVzL000YK6p/ZPkYUvQpXsnOhDuspY+KETg== X-Received: by 2002:a5d:540d:0:b0:21e:55f2:caf4 with SMTP id g13-20020a5d540d000000b0021e55f2caf4mr3008739wrv.585.1658427502026; Thu, 21 Jul 2022 11:18:22 -0700 (PDT) Received: from ?IPv6:2001:8a0:f924:2600:209d:85e2:409e:8726? ([2001:8a0:f924:2600:209d:85e2:409e:8726]) by smtp.gmail.com with ESMTPSA id u8-20020a05600c19c800b0039db31f6372sm3779491wmq.2.2022.07.21.11.18.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 21 Jul 2022 11:18:20 -0700 (PDT) Subject: Re: [PATCH 1/3] struct packed: Use gcc_struct on Windows To: Eli Zaretskii Cc: gdb-patches@sourceware.org References: <20220721152132.3489524-1-pedro@palves.net> <20220721152132.3489524-2-pedro@palves.net> <83h73amp19.fsf@gnu.org> <83a692mkj7.fsf@gnu.org> From: Pedro Alves Message-ID: <0bcdc048-ae9c-2f54-2450-66c13a62267c@palves.net> Date: Thu, 21 Jul 2022 19:18:20 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <83a692mkj7.fsf@gnu.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jul 2022 18:18:25 -0000 On 2022-07-21 6:40 p.m., Eli Zaretskii wrote: >> Cc: gdb-patches@sourceware.org >> From: Pedro Alves >> Because without it the struct won't really be packed. > > Can you tell why is that necessary? Somehow I missed this question. It is necessary because that's the whole point of "struct packed". To wrap some other type and pack it. We use it in some size-sensitive structures, to make them are as small as possible. This is described in the gdbsupport/packed.h header.