[Bug c/13856] [3.4/3.5 Regression] hidden support broken with builtin functions

uweigand at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Tue Feb 3 20:47:00 GMT 2004


------- Additional Comments From uweigand at gcc dot gnu dot org  2004-02-03 20:47 -------
Sorry, I was wrong: of course this is related to builtin functions. 
 
In fact, the current behaviour is directly caused by Zack's patch 
to fix PR 18314 (http://gcc.gnu.org/ml/gcc-patches/2004-01/msg02475.html). 
 
What happens is that 
 - first, we have a builtin declaration 
 - second, we get an excplicit declaration which matches the builtin; 
   it provides new attributes that are merged into the builtin decl 
 - third, we get a K&R definition; after Zack's patch K&R definitions 
   are considered to always override the builtin decl, hence the  
   builtin decl is thrown away together with the changed attributes 
 
Is this behaviour wrong?  Is the source code valid in the first place? 
 

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13856



More information about the Gcc-bugs mailing list