You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thus, perhaps you want to change the macro definitions such that no superfluous semicolons are expanded anymore. This would increase the portability of this header-only library.
See also:
Empty declarators are prohibited; a declaration must be a static_assert declaration or (since C11) have at least one declarator or declare at least one struct/union/enum tag, or introduce at least one enumeration constant.
Inspired by the documentation in the readme file I created this small test program:
This works as expected with gcc on Fedora 25. But on Solaris 10/SPARC with the Solaris Studio 12.3 C compiler I get the following warnings:
Looking at the C pre-processor output reveals the cause:
The expansion of both macros yields an extra semicolon!
Thus, removing the semicolons in the test program eliminates the warnings:
Thus, perhaps you want to change the macro definitions such that no superfluous semicolons are expanded anymore. This would increase the portability of this header-only library.
See also:
(http://en.cppreference.com/w/c/language/declarations)
The text was updated successfully, but these errors were encountered: