While testing my fix for 83871 (handling attributes on explicit specializations) I noticed another old regression: while GCC 4.4 would diagnose declarations of explicit soecializations of all primary templates declared deprecated, GCC 4.5 and later only diagnose declarations of explicit soecializations of class templates but not those of function or variable templates. The root cause of this regression is different than 83871 so I prefer to fix each separately. The attached patch does that. Because there is an opportunity to share code between the two fixes I expect to integrate one into the other (whichever is approved/committed last). Martin