> If we want to fix this, gcc must change. And this may
> also require GNU libc changes and linux kernel changes, etc.
Maybe you can enlighten us a bit on why GNU libc and linux kernel need
changes so that we can realize better how complicated the issue is.
> The talk about whether __GNUC__ is d
This is somewhat off-topic. Perhaps the GCC development team should
consider making this __GNUC__ stuff more clarified in the GCC Manual.
Now, this __GNUC__ stuff appears to appear only in the CPP Manual
(section 3.7.2). And the definition of similar macros such as __GFORTRAN__
and __GNUG__ may
> In any case, the documentation has in some sense misled you. __GNUC__
> is indeed defined by the compiler proper, not by the preprocessor.
> But that in turn does not matter, as if any non-gcc compiler *did* use
> the gcc preprocessor, it would do so via gcc -E.
> Googling "Intel C++ __GNUC__"
> I very much doubt that any compiler other than gcc uses the gcc
> preprocessor.
>
> In any case, the documentation has in some sense misled you. __GNUC__
> is indeed defined by the compiler proper, not by the preprocessor.
> But that in turn does not matter, as if any non-gcc compiler *did* use
I think an important point was missed in the discussion. Some seem to focus on
the dishonest definition of __GNUC__ by non-GNU C compilers. That was not my
point. My point is that if __GNUC__ is defined by CPP, not the GNU C compiler
proper, (and this seems to be supported by the CPP Manual,
I would like to see that GCC define a macro in the case it is being used to
compile a program. Currently there is a __GNUC__ macro defined by the GNU C
preprocessor CPP. That does not suit the need. As the CPP Manual says:
__GNUC__ is "defined by all GNU compilers that use the C preprocessor"
Is gcc optimized for thread level parallelism, in view of the recent
development of SMT and multicore architectures? Does gcc look for thread
level parallelism given a single threaded program (that is, when the
programmer does not parallelize the program using pthread etc.)?
And does gcc suppor