mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-10-06 01:12:40 +02:00
plug-ins: align with __attribute__ keyword.
The bug in old Bugzilla #138357 report was happening on icc on ia64 with -no-gcc option. It does look like after all these years, this is still a GCC attribute, but we use the same attributes on babl and GEGL code. So to be fair, it'd be useless to only forbid using it on GIMP code. And that makes for much less ugly code. Note that C11 has _Alignas() and C23 alignas() specifiers. These are standard, but we are typically still more into C99 code. Let's see if we move on to C11 some day… But for now, let's use __attribute__. Also I am unsure how much this issue is still relevant nowadays. Maybe even without specified alignment, it would now work fine with icc on IA-64. 🤷 Or maybe it really doesn't matter that much because Itanium has been discontinued in 2019, though I guess existing hardware will still be around for a bit longer.
This commit is contained in:
@@ -32,15 +32,14 @@ typedef struct my_error_mgr
|
||||
{
|
||||
struct jpeg_error_mgr pub; /* "public" fields */
|
||||
|
||||
#ifdef __ia64__
|
||||
/* Ugh, the jmp_buf field needs to be 16-byte aligned on ia64 and some
|
||||
* glibc/icc combinations don't guarantee this. So we pad. See bug #138357
|
||||
* for details.
|
||||
* glibc/icc combinations don't guarantee this.
|
||||
* See: https://bugzilla.gnome.org/show_bug.cgi?id=138357
|
||||
*
|
||||
* We used to pad with a dummy variable, but I believe using the
|
||||
* aligned attribute should be fine by now.
|
||||
*/
|
||||
long double dummy;
|
||||
#endif
|
||||
|
||||
jmp_buf setjmp_buffer; /* for return to caller */
|
||||
jmp_buf setjmp_buffer __attribute__((aligned(16))); /* for return to caller */
|
||||
} *my_error_ptr;
|
||||
|
||||
typedef enum
|
||||
|
Reference in New Issue
Block a user