all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juanma Barranquero <lekktu@gmail.com>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: 8254@debbugs.gnu.org
Subject: bug#8254: race condition in dired.c's scmp function
Date: Tue, 15 Mar 2011 12:36:45 +0100	[thread overview]
Message-ID: <AANLkTi=aNGOqq43uT87FpkFQ2Mng58g3b6jFDwwTH1C_@mail.gmail.com> (raw)
In-Reply-To: <4D7F15E7.1020407@cs.ucla.edu>

On Tue, Mar 15, 2011 at 08:31, Paul Eggert <eggert@cs.ucla.edu> wrote:

> Generally speaking,
> code is easier to read and contains fewer errors
> when function-like macros act like functions.

That's true, but then there's adding complexity when it is not needed.

In this case, it is hard to know whether it is needed or not. On one
hand, the only suspicious use of DOWNCASE is the one you pointed out.

On the other hand, DOWNCASE begat UPPERCASEP, who begat LOWERCASEP and
UPCASE (and also ISUPPER in regex.c). Not to mention UPCASE1, which
uses the same variables and begat UPCASE (with LOWERCASEP) and
NOCASEP... Though most of these cases use ?: and && and not ==, it is
certainly tedious to check every instance of these macros.

A (perhaps stupid) idea: would it be possible to define
-DENABLE-CHECKING alternate versions of DOWNCASE and UPCASE1 which do
some additional checking for side effects? That would allow finding
the possible bugs during development.

    Juanma





  parent reply	other threads:[~2011-03-15 11:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-15  6:16 bug#8254: race condition in dired.c's scmp function Paul Eggert
2011-03-15  7:06 ` Eli Zaretskii
2011-03-15  7:31   ` Paul Eggert
2011-03-15 10:50     ` Eli Zaretskii
2011-03-15 16:53       ` Paul Eggert
2011-03-15 11:36     ` Juanma Barranquero [this message]
2011-03-15 16:52       ` Paul Eggert
2011-03-15 16:58       ` Paul Eggert
2011-03-15 19:13         ` Stefan Monnier
2011-03-15 21:27           ` Paul Eggert
2011-03-16 13:19         ` Richard Stallman
2011-03-16 20:02           ` Paul Eggert
2011-03-17 16:56 ` Paul Eggert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTi=aNGOqq43uT87FpkFQ2Mng58g3b6jFDwwTH1C_@mail.gmail.com' \
    --to=lekktu@gmail.com \
    --cc=8254@debbugs.gnu.org \
    --cc=eggert@cs.ucla.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.