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

not support MSVC #26

Open
tkorays opened this issue Nov 4, 2022 · 4 comments
Open

not support MSVC #26

tkorays opened this issue Nov 4, 2022 · 4 comments

Comments

@tkorays
Copy link

tkorays commented Nov 4, 2022

We use C in windows with MSVC compiler, but __attribute__((cleanup)) does not work in MSVC. Is is possible to support MSVC?

@Snaipe
Copy link
Owner

Snaipe commented Nov 4, 2022

Not really. MSVC has no practical equivalent to the cleanup attribute, which is why there is a disclaimer that this only works for GNU C.

@bogen85
Copy link

bogen85 commented Nov 4, 2022

@Snaipe
Copy link
Owner

Snaipe commented Nov 4, 2022

Yes, clang and icc count as a GNU-flavored C, since they want to match GCC's general behavior. But MSVC does not, and therefore cannot work with this library.

@malkia
Copy link

malkia commented Sep 30, 2024

I wonder if MSVC's only "__try" / "__finally" can be used - although that's probably not good idea, but I was looking for RAII methods in "C" and just found this.

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

4 participants