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

Code review snippets to address from @davidben #400

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion sus/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ target_sources(subspace PUBLIC
"iter/zip.h"
"macros/__private/compiler_bugs.h"
"macros/assume.h"
"macros/arch.h"
"macros/builtin.h"
"macros/compiler.h"
"macros/eval_macro.h"
Expand Down
23 changes: 0 additions & 23 deletions sus/macros/arch.h

This file was deleted.

4 changes: 2 additions & 2 deletions sus/macros/pure.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
///
/// A pure function is allowed to dereference pointers, and access global
/// memory, but it may not change them. To do so can cause Undefined Behaviour.
#define sus_pure sus_if_msvc_else([[nodiscard]], __attribute__((pure)))
#define sus_pure [[nodiscard]] sus_if_not_msvc_compiler(, __attribute__((pure)))

/// Used to mark a function as "const", meaning it does not change any values
/// outside of its own scope, and does not read global memory.
Expand All @@ -31,4 +31,4 @@
/// A const function is allowed to only read from its inputs and determine an
/// output from them, without going through pointers or accessing global memory.
/// To do so anyway can cause Undefined Behaviour.
#define sus_pure_const sus_if_msvc_else([[nodiscard]], __attribute__((const)))
#define sus_pure_const [[nodiscard]] sus_if_msvc_else(, __attribute__((const)))
Loading
Loading