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

error: '_Generic' specifies two compatible types on MinGW size_t==unsigned long long #24

Open
hube12 opened this issue May 25, 2019 · 0 comments

Comments

@hube12
Copy link

hube12 commented May 25, 2019

#define _snow_generic_assert(x) \
	_Generic((x), \
		float: _snow_assert_dbl, \
		double: _snow_assert_dbl, \
		long double: _snow_assert_dbl, \
		void *: _snow_assert_ptr, \
		char *: _snow_assert_str, \
		int: _snow_assert_int, \
		long long: _snow_assert_int, \
		ssize_t: _snow_assert_int, \
		unsigned int: _snow_assert_uint, \
		unsigned long long: _snow_assert_uint, \
		size_t: _snow_assert_uint, \
		default: _snow_assert_fake)
#endif

Type size_t (aka unsigned long long) in generic association compatible with previously specified type unsigned long long

Would it be possible to add a Define flag to fix the issue with generic redfinition of the type instead of checking that #if(SIZEOF_SIZE_T == SIZEOF_INT) since on MSYS2/MingW64 those flags seems not to have the same size (size_t is 8 and int is 4) btw shouldnt it be long long?

Error on MSYS2/MingW64, works fine on CygWin64.

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