function overloading on __restrict__

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

it seems overloading on __restrict__ is not possible. I.e. GCC complains 
about:
void foo(float *__restrict__ mem) const;
void foo(float *mem) const;

This, to me, seems to have a very valid use case. Also the AIX C++ compiler 
docs ( 
http://publib.boulder.ibm.com/infocenter/comphelp/v7v91/index.jsp?topic=%2Fcom.ibm.vacpp7a.doc%2Flanguage%2Fref%2Fclrc03restrict_type_qualifier.htm) 
specify "The __restrict__ qualifier also affects parameter type specifications 
for overloaded functions in the same way as a cv-qualifier, thereby affecting 
the overload set."

In the GCC docs I couldn't find a statement either way. Was it a deliberate 
decision to not allow overloading on __restrict__? (I have to use -fabi-
version=4 anyway, so I don't care much if it would require a new ABI version.)

Regards,
	Matthias
-- 
Dipl.-Phys. Matthias Kretz
http://compeng.uni-frankfurt.de/?mkretz


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux