[LLVMbugs] [Bug 14196] New: We don't report invalid gotos in function templates until they are instantiated

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Oct 27 07:59:21 PDT 2012


http://llvm.org/bugs/show_bug.cgi?id=14196

             Bug #: 14196
           Summary: We don't report invalid gotos in function templates
                    until they are instantiated
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: rafael.espindola at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


We don't report a problem in
------------------------
template<int a>
struct C {
  C(int x);
  ~C();
  int i;
};
template<int a>
void f(void **ip) {
  static void *ips[] = { &&l0 };
 l0:
  const int &c1 = C<a>(1).i;
  goto *ip;
}

void g() {
  //  f<4>(0);
}
------------------------

but if f<4>(0) is uncommented we do.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list