[LLVMbugs] [Bug 9257] New: clang: error: cannot compile this GNU array range designator extension yet

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Feb 19 02:59:16 PST 2011


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

           Summary: clang:  error: cannot compile this GNU array range
                    designator extension yet
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: edwintorok at gmail.com
                CC: llvmbugs at cs.uiuc.edu
        Depends on: 4068


When compiling linux kernel with ARCH=um (usermode):
arch/um/kernel/process.c:191:37: error: cannot compile this GNU array range
designator extension yet
        p->thread = (struct thread_struct) INIT_THREAD;

Testcase:

struct faultinfo {
        int error_code;
        unsigned long cr2;
        int trap_no;
};
struct arch_thread {
        unsigned long debugregs[8];
        int debugregs_seq;
        unsigned long fs;
        struct faultinfo faultinfo;
};
struct __jmp_buf {
 unsigned long __rbx;
 unsigned long __rsp;
 unsigned long __rbp;
 unsigned long __r12;
 unsigned long __r13;
 unsigned long __r14;
 unsigned long __r15;
 unsigned long __rip;
};

typedef struct __jmp_buf jmp_buf[1];
struct uml_pt_regs {
 unsigned long gp[(((216)) / sizeof(unsigned long))];
 struct faultinfo faultinfo;
 long syscall;
 int is_user;
};
struct pt_regs {
 struct uml_pt_regs regs;
};
struct thread_struct {
 struct task_struct *saved_task;







 int forking;
 struct pt_regs regs;
 int singlestep_syscall;
 void *fault_addr;
 jmp_buf *fault_catcher;
 struct task_struct *prev_sched;
 unsigned long temp_stack;
 jmp_buf *exec_buf;
 struct arch_thread arch;
 jmp_buf switch_buf;
 int mm_count;
 struct {
  int op;
  union {
   struct {
    int pid;
   } fork, exec;
   struct {
    int (*proc)(void *);
    void *arg;
   } thread;
   struct {
    void (*proc)(void *);
    void *arg;
   } cb;
  } u;
 } request;
};

void foo(struct thread_struct *p)
{
    *p =
        (struct thread_struct) { .forking = 0, .regs = { .regs = { } },
.fault_addr = ((void *)0), .prev_sched = ((void *)0), .temp_stack = 0,
.exec_buf = ((void *)0), .arch = { .debugregs = { [ 0 ... 7 ] = 0 },
.debugregs_seq = 0, .fs = 0, .faultinfo = { 0, 0, 0 } }, .request = { 0 } };
}

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