[Ns-developers] [Ns-commits] craigdo/ns-3-tap
craigdo@ee.washington.edu
craigdo at ee.washington.edu
Fri Feb 6 11:23:02 PST 2009
> I don't really care that much but I think that we should:
> 1) avoid the use of these gcc-only attributes when we can
This is a good point. I poked around and I think each instance of the
__attribute__ ((unused)) actually pointed to a situation where the variable
could actually be checked and result in better code; or the value was truly
unimportant and didn't need to be fetched at all. I took this opportunity
and cleaned out the three or four instances in the code.
> 2) if we really need to, wrap them in a macro in
> src/core/something.h to
> avoid sprinkling gcc dependencies everywhere in the code.
I tend to get lulled into thinking that GCC is the center of the universe
sometimes. I haven't been paying attention to the icc situation that much,
but the discussions about it should have set up a flag about the GCC
dependency.
I'm not sure that playing with warnings could be done in a portable way
considering the fundamental differences between, for example, #pragma and
__attribute__ behavior in macros.
Anyway, I agree it is desirable to just avoid them.
-- Craig
More information about the Ns-developers
mailing list