Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert the offsetof() changes to customizable_test #55

Closed
isaac-io opened this issue Jul 14, 2022 · 0 comments · Fixed by #56
Closed

Revert the offsetof() changes to customizable_test #55

isaac-io opened this issue Jul 14, 2022 · 0 comments · Fixed by #56
Assignees
Labels
enhancement New feature or request

Comments

@isaac-io
Copy link
Contributor

As part of #7 (and later #27 as well) I made some changes to customizable_test because it was failing to build using Clang 12 and 13 with the following error:

options/customizable_test.cc:230:7: error: offset of on non-standard-layout type 'struct SimpleOptions' [-Werror,-Winvalid-offsetof]
     {offsetof(struct SimpleOptions, b), OptionType::kBoolean,
      ^                              ~
/usr/lib/clang/12.0.1/include/stddef.h:104:24: note: expanded from macro 'offsetof'
#define offsetof(t, d) __builtin_offsetof(t, d)
                       ^                     ~
options/customizable_test.cc:233:20: error: offset of on non-standard-layout type 'struct SimpleOptions' [-Werror,-Winvalid-offsetof]
                   offsetof(struct SimpleOptions, cu),
                   ^                              ~~
/usr/lib/clang/12.0.1/include/stddef.h:104:24: note: expanded from macro 'offsetof'
#define offsetof(t, d) __builtin_offsetof(t, d)
                       ^                     ~
options/customizable_test.cc:236:20: error: offset of on non-standard-layout type 'struct SimpleOptions' [-Werror,-Winvalid-offsetof]
                   offsetof(struct SimpleOptions, cs),
                   ^                              ~~
/usr/lib/clang/12.0.1/include/stddef.h:104:24: note: expanded from macro 'offsetof'
#define offsetof(t, d) __builtin_offsetof(t, d)
                       ^                     ~
options/customizable_test.cc:239:21: error: offset of on non-standard-layout type 'struct SimpleOptions' [-Werror,-Winvalid-offsetof]
                    offsetof(struct SimpleOptions, cp),
                    ^                              ~~
/usr/lib/clang/12.0.1/include/stddef.h:104:24: note: expanded from macro 'offsetof'
#define offsetof(t, d) __builtin_offsetof(t, d)
                       ^                     ~
4 errors generated.

I also opened facebook/rocksdb#8525 to track the issue on RocksDB's side.

Updating to Clang 14 fixed the issue on my system, which indicates that this is likely a compiler bug that was fixed, so let's revert the changes back to the original version.

@isaac-io isaac-io self-assigned this Jul 14, 2022
@isaac-io isaac-io linked a pull request Jul 14, 2022 that will close this issue
isaac-io added a commit that referenced this issue Jul 14, 2022
They were made because the original version failed to compile with Clang
12 and 13, complaining about `offsetof()` being applied to a non-standard-layout
type. The error is no longer emitted with Clang 14, so this is likely a
compiler bug that was fixed, and there's no need for this dirty hack.
@isaac-io isaac-io added the enhancement New feature or request label Jul 14, 2022
isaac-io added a commit that referenced this issue Jul 14, 2022
They were made because the original version failed to compile with Clang
12 and 13, complaining about `offsetof()` being applied to a non-standard-layout
type. The error is no longer emitted with Clang 14, so this is likely a
compiler bug that was fixed, and there's no need for this dirty hack.
ayulas pushed a commit that referenced this issue Jul 18, 2022
They were made because the original version failed to compile with Clang
12 and 13, complaining about `offsetof()` being applied to a non-standard-layout
type. The error is no longer emitted with Clang 14, so this is likely a
compiler bug that was fixed, and there's no need for this dirty hack.
Yuval-Ariel pushed a commit that referenced this issue Nov 23, 2022
They were made because the original version failed to compile with Clang
12 and 13, complaining about `offsetof()` being applied to a non-standard-layout
type. The error is no longer emitted with Clang 14, so this is likely a
compiler bug that was fixed, and there's no need for this dirty hack.
Yuval-Ariel pushed a commit that referenced this issue Nov 25, 2022
They were made because the original version failed to compile with Clang
12 and 13, complaining about `offsetof()` being applied to a non-standard-layout
type. The error is no longer emitted with Clang 14, so this is likely a
compiler bug that was fixed, and there's no need for this dirty hack.
Yuval-Ariel pushed a commit that referenced this issue Apr 30, 2023
They were made because the original version failed to compile with Clang
12 and 13, complaining about `offsetof()` being applied to a non-standard-layout
type. The error is no longer emitted with Clang 14, so this is likely a
compiler bug that was fixed, and there's no need for this dirty hack.
udi-speedb pushed a commit that referenced this issue Oct 31, 2023
They were made because the original version failed to compile with Clang
12 and 13, complaining about `offsetof()` being applied to a non-standard-layout
type. The error is no longer emitted with Clang 14, so this is likely a
compiler bug that was fixed, and there's no need for this dirty hack.
udi-speedb pushed a commit that referenced this issue Dec 1, 2023
They were made because the original version failed to compile with Clang
12 and 13, complaining about `offsetof()` being applied to a non-standard-layout
type. The error is no longer emitted with Clang 14, so this is likely a
compiler bug that was fixed, and there's no need for this dirty hack.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant