SDL/include
Sam Lantinga 1a4c0d4e17 Fixed bug 4377 - SDL_PIXELFORMAT enum is anonymous, which prevents its use in a templated function
zen3d

While trying to build Pixie lisp (https://github.com/pixie-lang/pixie), which uses SDL for multimedia output, the mandelbrot example won't build. The problem is that internally pixie uses a templated function to dump a value, and gcc chokes because SDL_PIXELFORMAT_RGA8888 is an anonymous enum.

I solved the problem locally by changing from:
   enum {
      SDL_PIXELFORMAT_UNKNOWN,
      ... etc. ...
      SDL_PIXELFORMAT_YUYV = ... etc ...
   };
to:
   typedef enum {
      SDL_PIXELFORMAT_UNKNOWN,
      ... etc. ...
      SDL_PIXELFORMAT_YUYV = ... etc ...
   } SDL_PIXELFORMAT_ENUM;
The net result of this change is that the enum containing SDL_PIXELFORMAT_* is no longer an anonymous enum and can now be used by a templated function.

This local change fixes Pixie lisp for me.

I did notice that you use the idiom
   typedef enum {
      ... etc ...
   } SDL_FOO;
elsewhere in your code, so that change to SDL_PIXELFORMAT doesn't look like it would have a negative impact.
2018-11-12 19:23:49 -08:00
..
2018-01-03 10:03:25 -08:00
2018-01-03 10:03:25 -08:00
2018-01-03 10:03:25 -08:00
2018-01-03 10:03:25 -08:00
2018-01-03 10:03:25 -08:00
2018-01-03 10:03:25 -08:00
2018-08-21 13:29:21 -07:00
2018-08-21 13:29:21 -07:00
2018-08-21 13:29:21 -07:00
2018-01-03 10:03:25 -08:00
2018-01-03 10:03:25 -08:00
2018-01-03 10:03:25 -08:00
2018-01-03 10:03:25 -08:00
2018-01-03 10:03:25 -08:00
2018-01-03 10:03:25 -08:00
2018-01-03 10:03:25 -08:00
2018-01-03 10:03:25 -08:00
2018-01-03 10:03:25 -08:00
2018-01-03 10:03:25 -08:00
2018-01-03 10:03:25 -08:00
2018-01-03 10:03:25 -08:00
2018-01-03 10:03:25 -08:00
2018-01-03 10:03:25 -08:00
2018-01-03 10:03:25 -08:00
2018-01-03 10:03:25 -08:00
2018-01-03 10:03:25 -08:00
2018-01-03 10:03:25 -08:00
2018-01-03 10:03:25 -08:00
2018-01-03 10:03:25 -08:00
2018-01-03 10:03:25 -08:00
2018-01-03 10:03:25 -08:00
2018-01-03 10:03:25 -08:00
2018-09-05 21:24:13 -04:00
2018-01-03 10:03:25 -08:00
2018-01-03 10:03:25 -08:00
2018-01-03 10:03:25 -08:00
2018-01-03 10:03:25 -08:00
2018-01-03 10:03:25 -08:00
2018-01-03 10:03:25 -08:00
2018-01-03 10:03:25 -08:00
2018-01-03 10:03:25 -08:00
2018-01-03 10:03:25 -08:00
2018-01-03 10:03:25 -08:00
2018-01-03 10:03:25 -08:00
2018-01-03 10:03:25 -08:00
2018-01-03 10:03:25 -08:00
2018-01-03 10:03:25 -08:00
2018-01-03 10:03:25 -08:00
2018-01-03 10:03:25 -08:00
2018-09-26 10:08:14 -07:00
2018-08-21 12:11:34 -07:00