ВходНаше всё Теги codebook 无线电组件 Поиск Опросы Закон Среда
24 апреля
730741 Топик полностью
fk0, легенда (25.01.2017 00:12, просмотров: 141) ответил LightElf на Знатокам C:
Смотри: 
sysop@pc:~$ gcc -Wall -Wextra -std=c89 -pedantic testcl.c 
testcl.c: In function 'main':
testcl.c:15:21: warning: ISO C90 forbids compound literals [-Wpedantic]
  return f((struct s){ 2, 3});
                     ^
sysop@pc:~$ gcc -Wall -Wextra -std=c90 -pedantic testcl.c 
testcl.c: In function 'main':
testcl.c:15:21: warning: ISO C90 forbids compound literals [-Wpedantic]
  return f((struct s){ 2, 3});
                     ^
sysop@pc:~$ gcc -Wall -Wextra -std=c99 -pedantic testcl.c 
struct s { int a; int b; }; int f(struct s v) { return v.a*v.b; } int main() { return f((struct s){ 2, 3}); }
[ZX]