kika: (Default)
[personal profile] kika
[livejournal.com profile] pzz написал код, который приводит в изумление компилятор MS VS 2005 в режиме С, но отлично потребляется им же в режиме C++ и gcc в любом режиме.
Выжимка этого кода:
typedef union { char a; } u;
typedef struct{ u a1; } s;
void foo(u *up) { s s1 = { *up }; }

Приводит к
error C2440: 'initializing' : cannot convert from 'u' to 'char'

Кротофф, скажи что я лох?
This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

Profile

kika: (Default)
kika

January 2017

S M T W T F S
1234567
89 1011121314
151617181920 21
22232425262728
293031    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Feb. 17th, 2026 12:03 am
Powered by Dreamwidth Studios