Sujet : Re: how to make a macro work as a single line if stmt without braces
De : david.brown (at) *nospam* hesbynett.no (David Brown)
Groupes : comp.lang.cDate : 23. Sep 2024, 13:22:30
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vcrmi6$2n375$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0
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.