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

C compatibility errors with anonymous structs #4

Open
jeremybernstein opened this issue Oct 29, 2021 · 0 comments
Open

C compatibility errors with anonymous structs #4

jeremybernstein opened this issue Oct 29, 2021 · 0 comments

Comments

@jeremybernstein
Copy link

jeremybernstein commented Oct 29, 2021

Hi, when compiling SWS on macOS 11.6.1 with Xcode 13, I get some annoying warnings:

In file included from /Users/me/Projects/sws/reaper/reaper.cpp:31:
/Users/me/Projects/sws/vendor/reaper-sdk/sdk/reaper_plugin.h:362:15: warning: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here [-Wnon-c-typedef-for-linkage]
typedef struct
              ^
               PCM_source_peaktransfer_t
/Users/me/Projects/sws/vendor/reaper-sdk/sdk/reaper_plugin.h:405:3: note: type is not C-compatible due to this member declaration
  static inline int extra_blocksize(int extra_requested_data_type)
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/me/Projects/sws/vendor/reaper-sdk/sdk/reaper_plugin.h:417:3: note: type is given name 'PCM_source_peaktransfer_t' for linkage purposes by this typedef declaration
} PCM_source_peaktransfer_t;
  ^
1 warning generated.

It would be great if the C-style typedef struct could include the struct name to de-anonymize it and eliminate those warnings (as the warning claims, the compiler is naming the struct behind the scenes anyway).

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

No branches or pull requests

1 participant