[ros-dev] [ros-diffs] [akhaldi] 58662: [PSDK] * Import DEFAULT_UNREACHABLE from Wine.

Timo Kreuzer timo.kreuzer at web.de
Thu Apr 4 10:03:54 UTC 2013


The last definition is not correct, it will not compile. You need 
"default: (void)0;" or "default: break;"
And the thing should also go to ntdef.h


Am 03.04.2013 23:17, schrieb akhaldi at svn.reactos.org:
> Author: akhaldi
> Date: Wed Apr  3 21:16:57 2013
> New Revision: 58662
>
> URL: http://svn.reactos.org/svn/reactos?rev=58662&view=rev
> Log:
> [PSDK]
> * Import DEFAULT_UNREACHABLE from Wine.
>
> Modified:
>      trunk/reactos/include/psdk/winnt.h
>
> Modified: trunk/reactos/include/psdk/winnt.h
> URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winnt.h?rev=58662&r1=58661&r2=58662&view=diff
> ==============================================================================
> --- trunk/reactos/include/psdk/winnt.h [iso-8859-1] (original)
> +++ trunk/reactos/include/psdk/winnt.h [iso-8859-1] Wed Apr  3 21:16:57 2013
> @@ -415,6 +415,15 @@
>   typedef DWORD FLONG;
>   
>   #define C_ASSERT(expr) extern char (*c_assert(void)) [(expr) ? 1 : -1]
> +
> +/* Eliminate Microsoft C/C++ compiler warning 4715 */
> +#if defined(_MSC_VER) && (_MSC_VER > 1200)
> +# define DEFAULT_UNREACHABLE default: __assume(0)
> +#elif defined(__clang__) || (defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5))))
> +# define DEFAULT_UNREACHABLE default: __builtin_unreachable()
> +#else
> +# define DEFAULT_UNREACHABLE default:
> +#endif
>   
>   #include "intrin.h"
>   
>
>
>




More information about the Ros-dev mailing list