------- Comment #8 from mmitchel at gcc dot gnu dot org  2006-08-26 16:53 
-------
We do have code to notice use-before-specialization errors.  For example:

  template <typename T> void f();
  void g() {
    f<int>();
  }
  template <> void f<int>() {}

results in an error.

However, the code to initialize static variables is not generated until
end-of-file, so we do not realize that we are in this situation.  (See
expand_static_init for the point at which we defer initialization.)


-- 


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

Reply via email to