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

Add UBENCH_ATTRIBUTE #27

Merged
merged 1 commit into from
Dec 3, 2023
Merged

Add UBENCH_ATTRIBUTE #27

merged 1 commit into from
Dec 3, 2023

Conversation

aganm
Copy link
Contributor

@aganm aganm commented Dec 3, 2023

After having had to debug UTEST code again, I realized that it having a UTEST_ATTRIBUTE macro was nicer to read than not having it. I realized that the macro was easier to remember and less error prone, because I didn't have to remember the correct syntax and I didn't have to double check everytime.

I had opened a PR on UTEST to remove the macro with the intent of uniformizing with UBENCH. If you agree, I would like to uniformize UBENCH with UTEST instead and give it its own UBENCH_ATTRIBUTE macro as well. I will close the other PR if you agree.

Note: while there is a single syntax that works everywhere ('__attribute' instead of '__attribute__'), I do like having both hidden behind the macro, because it remembered me about the difference between the two, it would be easy to forget why this change had to be made otherwise.

@sheredom sheredom merged commit 3294239 into sheredom:master Dec 3, 2023
45 checks passed
@sheredom
Copy link
Owner

sheredom commented Dec 3, 2023

Aye this seems harmless! Nice one!

@aganm aganm deleted the attribute branch December 3, 2023 14:34
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

Successfully merging this pull request may close these issues.

2 participants