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

Warning: offset of on non-standard-layout type #135

Open
allsey87 opened this issue Jan 1, 2022 · 0 comments
Open

Warning: offset of on non-standard-layout type #135

allsey87 opened this issue Jan 1, 2022 · 0 comments
Labels

Comments

@allsey87
Copy link

allsey87 commented Jan 1, 2022

Bug report

Required Info:

  • Operating System:
    • WASI SDK (Clang 13)
  • Installation type:
    • Building from source
  • Version or commit hash:
  • DDS implementation:
    • Not applicable
  • Client library (if applicable):
    • Not applicable

Steps to reproduce issue

Perhaps this is specific to WASI's libc, but when I compile test_msgs I am getting 7 warnings from w_strings__type_support.cpp about invalid offsets. For example:

test_msgs/rosidl_typesupport_introspection_cpp/test_msgs/msg/detail/w_strings__type_support.cpp:123:5: warning: offset of on non-standard-layout type 'test_msgs::msg::WStrings' (aka 'WStrings_<std::allocator<void>>') [-Winvalid-offsetof]
    offsetof(test_msgs::msg::WStrings, wstring_value),  // bytes offset in struct
    ^                                  ~~~~~~~~~~~~~
/opt/wasi-sdk/lib/clang/13.0.0/include/stddef.h:104:24: note: expanded from macro 'offsetof'
#define offsetof(t, d) __builtin_offsetof(t, d)
                       ^                     ~

Expected behavior

No warnings should be produced during compilation.

Actual behavior

The above warning appears 7 times

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants