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

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

Path: ...!weretis.net!feeder8.news.weretis.net!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 14:22:30 +0200
Organization: A noiseless patient Spider
Lines: 21
Message-ID: <vcrmi6$2n375$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>
 <vcr138$2jlgq$1@dont-email.me> <vcr41q$2k34a$1@dont-email.me>
 <vcrbgv$2l5s8$1@dont-email.me> <vcrgde$2ltof$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 23 Sep 2024 14:22:30 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="62bd3a602a060bc6951f98aedab86581";
	logging-data="2854117"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18JqNSLtwzsYKmzB7HE4YBmIDMoEhN1dGk="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
 Thunderbird/102.11.0
Cancel-Lock: sha1:runyB4vDsC7sAwoPJcMqEZQr/mU=
In-Reply-To: <vcrgde$2ltof$1@dont-email.me>
Content-Language: en-GB
Bytes: 2258

On 23/09/2024 12:37, Richard Harnden wrote:

> So, to me anyway, telling gcc that tabstops are 27 would suppress all 
> the useful warnings.
> 

I see what you mean.

Fair enough - it seems that picking a tabstop setting that matches your 
editor settings could catch some mistakes that a different tabstop 
setting would not.  Equally, I think from my example, having a different 
tabstop setting would catch other errors that one matching your editor 
would not.

And in my brief testing, using gcc 13, it failed to catch several cases 
of indentation mismatches, regardless of the tabstop setting, which is a 
bit disappointing.

I think perhaps the best solution would be for gcc to warn about 
space/tab mismatches as well, regardless of the tabstop settings.