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

Bonsai, Chorus and __restrict #7081

Closed
baconpaul opened this issue Jun 29, 2023 · 1 comment · Fixed by #7125
Closed

Bonsai, Chorus and __restrict #7081

baconpaul opened this issue Jun 29, 2023 · 1 comment · Fixed by #7125
Labels
Code Refactoring General code refactoring and cleanup issues like names, unused variables, warnings, fixme DSP Issues and feature requests related to sound generation in the synth Effects
Milestone

Comments

@baconpaul
Copy link
Collaborator

diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt
index 1996fc19..196df2ee 100644
--- a/src/common/CMakeLists.txt
+++ b/src/common/CMakeLists.txt
@@ -317,6 +317,7 @@ elseif(UNIX)
     target_link_libraries(${PROJECT_NAME} PRIVATE execinfo)
   endif()
   target_link_libraries(${PROJECT_NAME} PUBLIC surge::simde)
+  target_compile_options(${PROJECT_NAME} PUBLIC $<$<CXX_COMPILER_ID:GNU>:-Werror=restrict>)
 elseif(WIN32)
   target_compile_definitions(${PROJECT_NAME} PUBLIC
     WINDOWS=1

will make bonsai fail to build on gcc with a thousand errors and Chorus with one

We need to be careful either removing restrict or having in-place versions of operations.

@baconpaul baconpaul added the Feature Request New feature request label Jun 29, 2023
@baconpaul baconpaul added this to the Surge XT 1.3 milestone Jun 29, 2023
@mkruselj mkruselj added Code Refactoring General code refactoring and cleanup issues like names, unused variables, warnings, fixme DSP Issues and feature requests related to sound generation in the synth Effects and removed Feature Request New feature request labels Jul 5, 2023
baconpaul added a commit to baconpaul/sst-basic-blocks that referenced this issue Jul 29, 2023
Allowing __restrict to be used correctly

Addresses surge-synthesizer/surge#7081
baconpaul added a commit to baconpaul/sst-effects that referenced this issue Jul 29, 2023
baconpaul added a commit to baconpaul/surge that referenced this issue Jul 29, 2023
@baconpaul
Copy link
Collaborator Author

Branch baconpaul/restrict-7081 of surge, sst-effects and sst-basic-blocks allows this to compile with warning on on linux

my linux test env isn't as good as my mac one so i'll finish off over there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Refactoring General code refactoring and cleanup issues like names, unused variables, warnings, fixme DSP Issues and feature requests related to sound generation in the synth Effects
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants