[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: socket.h
From: |
Paul Eggert |
Subject: |
Re: socket.h |
Date: |
Mon, 23 Jan 2006 16:18:33 -0800 |
User-agent: |
Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) |
Jim Meyering <address@hidden> writes:
> I find that those parentheses provide no benefit. Although coreutils
> doesn't use that module, it might be worthwhile to start following the
> same guideline in gnulib.
I've never run into a compiler that didn't support "defined FOO", and
I don't see any technical reason to prefer the parentheses.
As it happens, over the weekend I replaced "defined (FOO)" with
"defined FOO" in the Bison source code; see
<http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00085.html>.
This was inspired by my port of the coreutils sc_useless_cpp_parens
check, which I recently added to Bison.
I had left the parentheses in for many years because I thought some
ancient compilers might have required them, and Bison-generated
parsers ought to be very conservative. But I checked the source code
to the Unix Version 7 cpp, dated 1979-01-10, and it it supports
"defined FOO" as well as "defined (FOO)". That convinced me that the
parens weren't ever needed.
Re: socket.h, Simon Josefsson, 2006/01/24