[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


           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:

error: out-of-line definition of 'bar' does not match any declaration in 'foo'
void foo::bar(int * a) __restrict {
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