101

Вопрос по linux, c, kernel – Что означает [N… M] в агрегатных инициализаторах C?

Error: User Rate Limit ExceededError: User Rate Limit ExceededError: User Rate Limit Exceeded

void *sys_call_table[__NR_syscalls] = 
{
    [0 ... __NR_syscalls-1] = sys_ni_syscall,
#include <asm/unistd.h>
};

sys_call_tableError: User Rate Limit Exceeded

[0 ... __NR_syscalls-1]

Error: User Rate Limit Exceeded...?


EDIT:
Error: User Rate Limit Exceeded#include <asm/unistd.h>Error: User Rate Limit ExceededpreprocessedError: User Rate Limit Exceeded[0 ... _NR_syscalls-1].

Error: User Rate Limit Exceeded<code>char *argv[]</code>Error: User Rate Limit Exceeded

Apr 10, 2012, 2:48 PMот

Error: User Rate Limit Exceeded<code>void (*sys_call_table)[__NR_syscalls]</code>

Apr 10, 2012, 2:34 PMот

1ответ

91

Error: User Rate Limit ExceededError: User Rate Limit Exceeded.

Error: User Rate Limit Exceeded

To initialize a range of elements to the same value, write [first ... last] = value. This is a GNU extension. For example,

 int widths[] = { [0 ... 9] = 1, [10 ... 99] = 2, [100] = 3 };

Error: User Rate Limit Exceeded-pedanticError: User Rate Limit Exceeded

How does it work here?
Error: User Rate Limit Exceeded#include <asm/unistd.h>Error: User Rate Limit Exceededit defines miscellaneous symbolic constants and types, and declares miscellaneous functionsError: User Rate Limit Exceeded

RelatedQuestions