From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#49261: Segfault during loadup Date: Wed, 14 Jul 2021 17:04:35 -0500 Message-ID: References: <87pmvum54p.fsf@gnus.org> <87v95mf2lj.fsf@gmx.de> <87pmvt3ob1.fsf@gnus.org> <83r1g9evoy.fsf@gnu.org> <83pmvtevgg.fsf@gnu.org> <87czrt3mj4.fsf@gnus.org> <878s2h3m1d.fsf@gnus.org> <874kd53lnl.fsf@gnus.org> <87zgux26ab.fsf@gnus.org> <87pmvt25uq.fsf@gnus.org> <87lf6h2294.fsf@gnus.org> <87h7h51x9y.fsf_-_@gnus.org> <83bl79b17n.fsf@gnu.org> <835yxgc1pm.fsf@gnu.org> <83wnpvag6z.fsf@gnu.org> <5608bf0a-7211-73a9-690f-c869a1cb3c9d@cs.ucla.edu> <83o8b7a5ow.fsf@gnu.org> <87lf69e3ya.fsf@igel.home> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25565"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 Cc: larsi@gnus.org, 49261@debbugs.gnu.org To: Andreas Schwab Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jul 15 00:05:31 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m3n0V-0006Xv-GC for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 15 Jul 2021 00:05:31 +0200 Original-Received: from localhost ([::1]:34482 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m3n0U-0006ui-I2 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 14 Jul 2021 18:05:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48900) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3n02-0006uU-QN for bug-gnu-emacs@gnu.org; Wed, 14 Jul 2021 18:05:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34500) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m3n02-0002cz-Ir for bug-gnu-emacs@gnu.org; Wed, 14 Jul 2021 18:05:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m3n02-00070s-5B for bug-gnu-emacs@gnu.org; Wed, 14 Jul 2021 18:05:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 14 Jul 2021 22:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49261 X-GNU-PR-Package: emacs Original-Received: via spool by 49261-submit@debbugs.gnu.org id=B49261.162630028526927 (code B ref 49261); Wed, 14 Jul 2021 22:05:02 +0000 Original-Received: (at 49261) by debbugs.gnu.org; 14 Jul 2021 22:04:45 +0000 Original-Received: from localhost ([127.0.0.1]:46046 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3mzl-00070F-Eu for submit@debbugs.gnu.org; Wed, 14 Jul 2021 18:04:45 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:49608) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3mzj-000700-3F for 49261@debbugs.gnu.org; Wed, 14 Jul 2021 18:04:43 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 906451600B2; Wed, 14 Jul 2021 15:04:37 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id RSOyX0JJ_nDT; Wed, 14 Jul 2021 15:04:36 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 864621600B7; Wed, 14 Jul 2021 15:04:36 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 8qhsaBGpYUtS; Wed, 14 Jul 2021 15:04:36 -0700 (PDT) Original-Received: from [192.168.0.205] (ip72-206-1-93.fv.ks.cox.net [72.206.1.93]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 16EEF1600B2; Wed, 14 Jul 2021 15:04:36 -0700 (PDT) In-Reply-To: <87lf69e3ya.fsf@igel.home> Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:209971 Archived-At: On 7/14/21 2:42 AM, Andreas Schwab wrote: > On Jul 13 2021, Paul Eggert wrote: > >> However, there is no overflow here: >> >> unsigned a = -1, b = INT_MIN, c = LLONG_MAX; >> >> and these declarations have well-defined behavior in C, > This is a bogus argument. It's not bogus. I quoted the GCC documentation and noted that GCC's behavior does not match its documentation. At the very least -- even if you like GCC's behavior, which I don't -- the documentation should match the behavior. > assinging a wider constant to a narrow object, > losing bits, is likely hiding a bug. If that's what you think -Woverflow should do, then GCC doesn't do that either. For example: unsigned char a = -1, b = 255; This generates no warning with -Woverflow, even though A's initialization assigns a wider constant to a narrow object, losing bits. Without looking at GCC's source code, it's not clear what -Woverflow actually does. It is a bit of a mess. Certainly -Woverflow does not do what it's documented to do.