From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-3.6 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 5B27E1F55B for ; Sat, 23 May 2020 14:36:51 +0000 (UTC) Received: from localhost ([::1]:53818 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jcVGc-0007KF-7O for normalperson@yhbt.net; Sat, 23 May 2020 10:36:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33728) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jcVGV-0007Jr-9I for bug-gnulib@gnu.org; Sat, 23 May 2020 10:36:43 -0400 Received: from mail-pg1-x532.google.com ([2607:f8b0:4864:20::532]:44619) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jcVGU-0001BO-GR for bug-gnulib@gnu.org; Sat, 23 May 2020 10:36:43 -0400 Received: by mail-pg1-x532.google.com with SMTP id p30so6345341pgl.11 for ; Sat, 23 May 2020 07:36:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=S8Nz8wrDraSxeehcDHVal+KwPwp5bCtF6rQ4O3raejo=; b=gwmfLlbAhsxoA7/UI89x7jdPfApSwKd3TPBYk0cocvU85DzZ7EfwTUtssmMe0fjWJ8 omdQdyjIyWp8ws1L7c/ZF+dgJmz989Dn/4l01F1NSP02v1VnJQSNy0nIhFIkuSh7hEhs 3RvP+ZvbVd4NzfvWLsgIQfcgnztDoqUwXO2YfC/BmLNpEM+r24CehgBhHO0oij1LQXJb m/qHyQ65B6wORvrXuP94zbUTfR7zwXlVvf7G5ENZLNO5nBvVp+7mSGrZm/J3mZk3AtAk Jn2ZGevpZCekAe8t4/wwOmlceItoOPLa1I7IvYABIkNGBgzEXQkt1Rv9vQ4oLo6kHQLJ 4rOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=S8Nz8wrDraSxeehcDHVal+KwPwp5bCtF6rQ4O3raejo=; b=QOvTHsXk/KfRxHU+RHy+IqvrjAIzyFObH0Jq7le77rsc9xpHRRNYtrGmLBV90TmFrr n71WWwb7jA1xYKte/5BUfPpOYGXTcYEi3+f4GK10YTWKncpojSgeY3qszIFUsnydbrRD Xnh/hu+FFCnDt8Ze4tnmSqH9MXVr5m+EPxoVULXFwH0kxtPtKKhWDq40x2trO821/bpe umgzgEfCd7G20yaM30Lmvwea1l0j25dHVMSipIPtglUZsygLOGeFTjgRI6bsha2It2SG f/f0SAxZl1T9lYDh33hkyeIw3AhI6CERKz0QCivfsDCbQRnFjGdRdndMy7RMMElu2t9i VgUA== X-Gm-Message-State: AOAM532oWK5j+tt15dxr1K48xhZVFy05g+qaEoorcMR38NIif/e1bykj zGxYAhjK38MG/w7imALbpkmQ8ji4+Ypvpl4D9VU= X-Google-Smtp-Source: ABdhPJxdekufT2vn7PlcYEm0c2H4HW1V6zX8JEfafSbuBBgZfqNBZjs1hNNw+41G20enF8SQt/H/tXaiV1V/ZhZG35Q= X-Received: by 2002:a65:4947:: with SMTP id q7mr18894717pgs.23.1590244600803; Sat, 23 May 2020 07:36:40 -0700 (PDT) MIME-Version: 1.0 References: <1665251.0HJpBWKgsO@omega> <2943012.YJjvApnCys@omega> In-Reply-To: <2943012.YJjvApnCys@omega> From: =?UTF-8?Q?Marc_Nieper=2DWi=C3=9Fkirchen?= Date: Sat, 23 May 2020 16:36:29 +0200 Message-ID: Subject: Re: stack module To: Bruno Haible Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2607:f8b0:4864:20::532; envelope-from=marc.nieper@gmail.com; helo=mail-pg1-x532.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?Q?Marc_Nieper=2DWi=C3=9Fkirchen?= , bug-gnulib@gnu.org Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" Am Sa., 23. Mai 2020 um 16:02 Uhr schrieb Bruno Haible : > I was expecting that you write > > struct > { > void *base; ... > } This removes type safety. The benefit of the current approach is that stack types of different types are not compatible. > Then macro should better be called STACK_FREE or STACK_DESTROY. > The name STACK_CLEAR suggests that the result is still a valid stack, and empty. Thank you for this suggestion; much better. > > In the form of assure of the assure module? Or, to facilitate > > optimization, better assume from verify module? In non-debug builds, I > > want to make sure that no superfluous checks are made. > > The 'verify' module is for compile-time checks. > > 'assure' is an improved form of 'assert'. The verify also contains a runtime check `assume', which uses __builtin_unreachable if available to help the compiler in optimizing modes.