Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Padding Err
Language:
Ada
Assembly
Bash
C#
C++ (gcc)
C++ (clang)
C++ (vc++)
C (gcc)
C (clang)
C (vc)
Client Side
Clojure
Common Lisp
D
Elixir
Erlang
F#
Fortran
Go
Haskell
Java
Javascript
Kotlin
Lua
MySql
Node.js
Ocaml
Octave
Objective-C
Oracle
Pascal
Perl
Php
PostgreSQL
Prolog
Python
Python 3
R
Rust
Ruby
Scala
Scheme
Sql Server
Swift
Tcl
Visual Basic
Layout:
Vertical
Horizontal
#include <stdio.h> #include <stdint.h> #include <assert.h> #include <stddef.h> typedef struct { float re; float im; } IQ; typedef struct { uint8_t a; int8_t a_pad[3]; IQ b; } S1; typedef struct { uint8_t a; IQ b; } S2; int main(void) { assert(offsetof(S1, a) == offsetof(S2, a)); assert(offsetof(S1, b) == offsetof(S2, b)); // this should fail, but doesn't! return 0; }
gcc
Show compiler warnings
[
+
] Compiler args
[
+
]
Show input
Compilation time: 0.15 sec, absolute running time: 0.41 sec, cpu time: 0.29 sec, memory peak: 3 Mb, absolute service time: 0,57 sec
edit mode
|
history
|
discussion