On Wed, 28 May 2014 09:23:30 +0200 Juergen Borleis <jbe@xxxxxxxxxxxxxx> wrote: > Hi Antony, > > On Tuesday 27 May 2014 16:04:11 Antony Pavlov wrote: > > [...] > > If you use #ifdef: > > > > #ifdef CONFIG_DEBUG_FS > > err = tegra_dsi_debugfs_init(dsi, tegra->drm->primary); > > if (err < 0) > > dev_err(dsi->dev, "debugfs setup failed: %d\n", err); > > #endif > > > > then you get jut the same result but without checking the code under #ifdef > > CONFIG_DEBUG_FS. > > A syntax check is always done by the pre-processor. So, the code between the Yes, the C pre-processor checks the syntax for input, but only the C pre-procesor directive syntax! But here I mean exactly C code checking. > #ifdef/#endif must be valid C code or be commented out. > But there is no further check, because the lines between the #ifdef/#endif are > never seen by the compiler. > That's exactly what I mean! E.g. antony@doce:~$ cat > test.c <<EOF; int main() { #ifdef SOME_UNDEFINED_MACRO foo bar; фу бар; #endif return 0; } EOF antony@doce:~$ gcc test.c antony@doce:~$ ./a.out antony@doce:~$ ./a.out antony@doce:~$ echo $ 0 -- Best regards, Antony Pavlov _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox