Created
July 28, 2016 08:30
-
-
Save pizzamig/d9211077ff52431a25ddb418b496979b to your computer and use it in GitHub Desktop.
extended offsetof case
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* The warning is issued using -pedantic */ | |
#include <sys/stddef.h> | |
struct foo | |
{ | |
int i; | |
int j; | |
struct | |
{ | |
int x; | |
int k; | |
} bar; | |
}; | |
int main() | |
{ | |
return offsetof(struct foo, bar.x); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment