[LLVMbugs] [Bug 9834] New: clang accepts 'friend' at ill-formed positions in the decl-specifier-seq

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue May 3 11:19:27 PDT 2011


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

           Summary: clang accepts 'friend' at ill-formed positions in the
                    decl-specifier-seq
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: richard-llvm at metafoo.co.uk
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


clang accepts this:

  struct S {
    class T friend;
    unsigned friend char;
  };

Both of these are illegal by [class.friend]p3, which requires the 'friend'
decl-specifier to be the first in the decl-specifier-seq for non-function
declarations.

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