[LLVMbugs] [Bug 1866] New: clang says "byte" is not assignable

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Mon Dec 17 11:26:04 PST 2007


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

           Summary: clang says "byte" is not assignable
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Semantic Analyzer
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: edwintorok at gmail.com
                CC: llvmbugs at cs.uiuc.edu


testcase-min.i:10:12: error: expression is not assignable
      byte <<= 4;
      ~~~~ ^
1 diagnostic generated.

Testcase:

static char * rfc2231(const char *in) {
     const char *ptr;
     enum {
   LANGUAGE, CHARSET, CONTENTS }
    field;
     while(*ptr) {
     switch(field) {
     case CONTENTS:     if(*ptr == '%') {
      unsigned char byte;
      byte <<= 4;
     }
    }
    }
    }


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