mirror of
https://github.com/github/codeql.git
synced 2025-12-17 17:23:36 +01:00
19 lines
358 B
C
19 lines
358 B
C
// semmle-extractor-options: --clang
|
|
struct mystruct {
|
|
int f1;
|
|
int f2;
|
|
};
|
|
|
|
typedef int size_t;
|
|
|
|
#define edg_offsetof(t, memb) ((size_t)__INTADDR__(&(((t *)0)->memb)))
|
|
|
|
void f(void) {
|
|
int i1 = __builtin_offsetof(struct mystruct,f2);
|
|
int i2 = edg_offsetof(struct mystruct,f2);
|
|
}
|
|
|
|
void g(void) {
|
|
double f = __builtin_bit_cast(double,42l);
|
|
}
|