Replies: 3 comments 2 replies
-
Re raqm, that is a third party library included as-is (except for a small fribidi header included patch), and only used if you specify a specific build flag when installing Pillow. When I tried making that the default, I found a lot of the Linux systems tested in CI use a GCC version that defaults to C89 standard causing several compile errors in raqm. The line you found in display.c is also Windows-only, so will never be seen by GCC, only MSVC which now supports C99 by default (but didn't in the past).
I would say take that up with the GCC devs, but they have finally made the default a newer standard somewhat recently. |
Beta Was this translation helpful? Give feedback.
-
I found these two lines: Line 38 in 196210b Pillow/src/libImaging/QuantTypes.h Line 19 in 196210b
Pillow/src/libImaging/ImPlatform.h Lines 41 to 71 in 196210b |
Beta Was this translation helpful? Give feedback.
-
Still not clear to me if C99 should be considered minimum version for building Pillow. As I mentioned in #5367 (comment) I believe these lines in Quant.c uses a compound literal, which came in C99:
Correct me if I am mistaken. Maybe GCC supports this without specifying C99? Are there other places that use compound literals? |
Beta Was this translation helpful? Give feedback.
-
While looking through the C code I noticed that loop variables are always declared before the loop
instead of in it
except in /src/thirdparty/raqm/raqm.c and in this one location
Pillow/src/display.c
Line 519 in 4c59f77
C added support for this in C99, and a lot of this code is older than that so it makes sense that it wasn't used. But 1999 was also 23 years ago now. Should we still be trying to code to pre-C99, or should we start using a more modern standard? The makefile doesn't specify a standard to use.
Beta Was this translation helpful? Give feedback.
All reactions