public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Sebastian Huber <sebastian.huber@embedded-brains.de>
To: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] libgomp: Fix build for -fshort-enums
Date: Tue, 4 Jul 2023 08:20:14 +0200	[thread overview]
Message-ID: <1831603b-b2cb-c736-72f1-df86d65443a5@embedded-brains.de> (raw)
In-Reply-To: <20230522125149.30467-1-sebastian.huber@embedded-brains.de>

On 22.05.23 14:51, Sebastian Huber wrote:
> Make sure that the API enums have at least the size of int.  Otherwise the
> following build error may occur:
> 
> In file included from gcc/libgomp/env.c:34:
> ./libgomp_f.h: In function 'omp_check_defines':
> ./libgomp_f.h:77:8: error: size of array 'test' is negative
>     77 |   char test[(28 != sizeof (omp_lock_t)
>        |        ^~~~
> 
> libgomp/ChangeLog:
> 
> 	* omp.h.in (omp_alloctrait_key_t):  Add __omp_alloctrait_key_t_max__
> 	with a value of the int type maximum.
> ---
>   libgomp/omp.h.in | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/libgomp/omp.h.in b/libgomp/omp.h.in
> index bd1286c2a3f..3b1612fcb15 100644
> --- a/libgomp/omp.h.in
> +++ b/libgomp/omp.h.in
> @@ -146,7 +146,8 @@ typedef enum omp_alloctrait_key_t
>     omp_atk_fallback = 5,
>     omp_atk_fb_data = 6,
>     omp_atk_pinned = 7,
> -  omp_atk_partition = 8
> +  omp_atk_partition = 8,
> +  __omp_alloctrait_key_t_max__ = __INT_MAX__
>   } omp_alloctrait_key_t;
>   
>   typedef enum omp_alloctrait_value_t

Could someone please have a look at this.

-- 
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.huber@embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/

  reply	other threads:[~2023-07-04  6:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-22 12:51 Sebastian Huber
2023-07-04  6:20 ` Sebastian Huber [this message]
2023-09-11 12:57   ` Sebastian Huber
2024-01-19  9:55     ` Sebastian Huber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1831603b-b2cb-c736-72f1-df86d65443a5@embedded-brains.de \
    --to=sebastian.huber@embedded-brains.de \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).