[LLVMbugs] [Bug 10667] New: __restrict on methods?

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Aug 15 16:46:36 PDT 2011


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

           Summary: __restrict on methods?
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: echristo at gmail.com
                CC: llvmbugs at cs.uiuc.edu


llvm/test/FrontendC++/2007-08-01-RestrictMethod.cpp has this code:

class foo {
  int member[4];

  void bar(int * a);

};

void foo::bar(int * a) __restrict {
  member[3] = *a;
}

that clang rejects:

/Volumes/Data/sources/llvm/tools/clang/test/CodeGenCXX/2007-08-01-RestrictMethod.cpp:11:11:
error: out-of-line definition of 'bar' does not match any declaration in 'foo'
void foo::bar(int * a) __restrict {
     ~~~~~^
/Volumes/Data/sources/llvm/tools/clang/test/CodeGenCXX/2007-08-01-RestrictMethod.cpp:7:8:
note: member declaration nearly matches
  void bar(int * a);
       ^
1 error generated.

and llvm-gcc accepts.

Not quite sure what we should do for this and whether or not we should accept
the code.

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