Deutsch   English   Français   Italiano  
<vcr138$2jlgq$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: David Brown <david.brown@hesbynett.no>
Newsgroups: comp.lang.c
Subject: Re: how to make a macro work as a single line if stmt without braces
Date: Mon, 23 Sep 2024 08:16:07 +0200
Organization: A noiseless patient Spider
Lines: 24
Message-ID: <vcr138$2jlgq$1@dont-email.me>
References: <PaWdnZ3R-9zI6nP7nZ2dnZfqn_GdnZ2d@brightview.co.uk>
 <vcm16e$1hm2u$1@dont-email.me> <vcn6m8$1n1vu$1@dont-email.me>
 <vcp0rq$26p7b$1@dont-email.me> <20240922080605.59@kylheku.com>
 <vcpeo0$28shf$1@dont-email.me> <87zfnzpgmv.fsf@nosuchdomain.example.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 23 Sep 2024 08:16:08 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="e5920fb159a85938aa1aa69cf473670d";
	logging-data="2741786"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+qX/PNCE3gQbcb6E4u1S3FsbsfT+Q3SSg="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:0O/KiC4iJWplU8wMgVi3K5rZCcs=
In-Reply-To: <87zfnzpgmv.fsf@nosuchdomain.example.com>
Content-Language: en-GB
Bytes: 2227

On 22/09/2024 22:39, Keith Thompson wrote:
> Bart <bc@freeuk.com> writes:
>> On 22/09/2024 16:11, Kaz Kylheku wrote:
> [...]
>>> Also GCC has been able to diagnose misleading indentation for some
>>> years now.
>>
>> How many years was that out of the last 52? How exactly do you turn it
>> on? Since -Wall -Wpedantic -Wextra doesn't report it.
> 
> The -Wmisleading-indentation option was added to gcc on 2015-05-12,
> and incorporated into -Wall 2015-12-10.  gcc 6.1.0 has the option
> and includes it in -Wall; gcc 5.3.0 does not.  (Are you using a gcc
> release that old?)  It uses the -ftabstop= option (defaulting to 8)
> to determine whether indentation lines up or not.
> 
> Inconsistent tabstops and mixing of spaces and tabs can certainly
> cause problems.
> 

That would be detected quite easily if the default for -ftabstop were, 
say, 27.  Then the chance of accidentally matching indents with tabs and 
spaces would be negligible.