Skip to content

Rewrite offsetof with __builtin_offsetof with -fms-kernel#117

Open
eleviant wants to merge 1 commit into
access-softek:mainfrom
eleviant:rewrite-offsetof-in-mskernel
Open

Rewrite offsetof with __builtin_offsetof with -fms-kernel#117
eleviant wants to merge 1 commit into
access-softek:mainfrom
eleviant:rewrite-offsetof-in-mskernel

Conversation

@eleviant
Copy link
Copy Markdown
Contributor

Patch rewrites portion of AST if it is detected as offset calculation, e.g (size_t)&(((MyStruct*)0)->field). This expression is being rewritten by this patch as (size_t)__builtin_offsetof(MyStruct, field). Patch may affect compiler warnings, see test cases for details.

Patch rewrites portion of AST if it is detected as offset calculation,
e.g (size_t)&(((MyStruct*)0)->field). This expression is being rewritten
by this patch as (size_t)__builtin_offsetof(MyStruct, field). Patch may
affect compiler warnings, see test cases for details.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant