Run Code  | Code Wall  | Users  | Misc  | Feedback  | About  | Login  | Theme  | Privacy 

strange builtin_offseof behavior

Language: Layout:
+ ] Compiler args + ] Show input
Compilation time: 0.33 sec, absolute running time: 0.07 sec, cpu time: 0.01 sec, memory peak: 3 Mb, absolute service time: 0,4 sec 
fork mode |  history  | discussion
Warning(s):
source_file.cpp: In function ‘void f()’:
source_file.cpp:19:30: warning: offsetof within non-standard-layout type ‘A’ is undefined [-Winvalid-offsetof]
     (void)__builtin_offsetof(A, i);
                              ^
Hello, world!