Make compile-time assert error messages more clear.
authorRyan C. Gordon <icculus@icculus.org>
Sat, 10 Jun 2017 15:38:14 -0400
changeset 1108771ef4b78a753
parent 11086 7b1c534105d5
child 11088 69452f9839d5
Make compile-time assert error messages more clear.

Now the compiler might say this:

'SDL_compile_time_assert_mytest' declared as an array with a negative size

instead of

'SDL_dummy_mytest' declared as an array with a negative size
include/SDL_stdinc.h
     1.1 --- a/include/SDL_stdinc.h	Sat Jun 10 21:29:37 2017 -0300
     1.2 +++ b/include/SDL_stdinc.h	Sat Jun 10 15:38:14 2017 -0400
     1.3 @@ -269,7 +269,7 @@
     1.4  #endif /* SDL_DISABLE_ANALYZE_MACROS */
     1.5  
     1.6  #define SDL_COMPILE_TIME_ASSERT(name, x)               \
     1.7 -       typedef int SDL_dummy_ ## name[(x) * 2 - 1]
     1.8 +       typedef int SDL_compile_time_assert_ ## name[(x) * 2 - 1]
     1.9  /** \cond */
    1.10  #ifndef DOXYGEN_SHOULD_IGNORE_THIS
    1.11  SDL_COMPILE_TIME_ASSERT(uint8, sizeof(Uint8) == 1);