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] |
In message <r2ww8bx9uq.fsf@happy.cygnus.com>you write: > law@cygnus.com (Jeffrey A Law) writes: > > > typedef SFtype __attribute__ ((mode (SF))); > > > > We have an explicit type (SFmode), why in the hell would we ever > > want/need typedef int ....? > > Isn't it that the __attribute__ stuff is, well, an attribute and it > should be possible to drop it? Then yu would get > > typedef SFtype; > > which clearly is wrong. You simply cannot leave out the base type. I don't see that the "int" is a base type in this case. How can you have an integer base type for a floating point mode? This is one of those areas where someone familiar with language design should have been involved in specifying exactly what is supposed to happen. My simplistic viewpoint is typedef int SFtype __attribute__ ((mode (SF))); Is bogus -- the type is actually specified by the attribute and the "int" is neither used nor wanted. Frankly, I don't really care about this problem all that much, we're talking about a possible bogus warning. The only reason this came up at all is because libgcc2.c uses attributes like that and egcs complained about the implicit int. IMHO a case of warning elimination going too far. 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
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |