This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: PATCH: Relax AltiVec integral parameter/literal type checking



On 11 May, 2004, at 17.15, Fariborz Jahanian wrote:



On May 11, 2004, at 5:11 PM, Ziemowit Laski wrote:



On 11 May, 2004, at 17.01, Fariborz Jahanian wrote:



On May 11, 2004, at 4:45 PM, Ziemowit Laski wrote:


Continuing on my path to redemption...

This builds on Janis' discovery that AltiVec is now too strict (in the C
case, anyway) about requiring integral type parameters to have exactly
type 'int', which the AltiVec standard does not require; similar for
literal arguments. The solution is to _remove_ the type checks for
these integral parameters/literals, esp. since they don't add any
value in the overload resolution we're implementing.

So now no type checking will be done on these arguments? What if 2nd argument is not an integral type?

It gets cast to 'int', which will either succeed or fail according to "ordinary" type system rules. Similarly, the literals get cast to 'const int'.

I suppose that If it succeeds after your patch, then we have another bug, right?

I haven't modified the casting logic in the compiler, so if the compiler allows
a cast to int or const int, then it's probably OK. :-)


--Zem
--------------------------------------------------------------
Ziemowit Laski                 1 Infinite Loop, MS 301-2K
Mac OS X Compiler Group        Cupertino, CA USA  95014-2083
Apple Computer, Inc.           +1.408.974.6229  Fax .5477


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