This is the mail archive of the gcc-bugs@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]

[Bug c++/28058] [4.1/4.2 regression] ICE in inline_forbidden_p



------- 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


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