This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Need someone to look at a regression


| I'm more than willing to go with whatever group decision we come up
| with on this one.  If we decide the int is needed, then the testcase
| is bogus.  If the int is not needed, then the testcase is valid and
| we've got a bug in the compiler (since it shouldn't have given the
| warning).
| 
| jeff

I think there are two possibilities:

1) The use of a mode() makes this code only ever make sense when
   compiled with gcc.

Then suppression of the warning would be the best because when
the warning is not suppressed people will add 'int' and then
no warning will occur when compiling the code with another
compiler which uses:
#define __attribute__

2) It *does* make sense to compile code like this with other
   compilers (ie, using "#define __attribute__" somewhere).

In that case you want a 'backup' type to be added that will
be used when the __attribute__ is #defined away.
We need a NEW warning then however, when the overridden
type doesn't match the mode() somehow.  I am not sure if
that is possible since I don't know the mode() types :/

But, for example, I can imagine that we'd like to have
a warning when with

  typedef int XXtype __attribute__ ((mode (XX)));

sizeof(XXtype) != sizeof(int).

-- 
 Carlo Wood  <carlo@runaway.xs4all.nl>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]