On 11/01/19 02:01, Ehsan Akhgari wrote:
> The common way to deal with this problem is to indent nested preprocessor
> directives, very much similarly to how we indent normal code, for example:
> 
> #if foo
> #  if bar
> #    define x 1
> #  else
> #    define x 2
> #  endif
> #endif

this would be much better than what we have now and I recently ran into
an issue with a complex block of #ifdef's that I would have spotted
easily if they had been indented. The first iteration of a patch I wrote
"accidentally" cut out a chunk of a function when built on Windows but
still compiled and even executed most of our test suite just fine.
Fortunately a couple of xpchsell tests failed, but if it hadn't been
covered by those I might not have spotted the error at all.

 Gabriele

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to