Re: Suboptimal warning formatting with `bool` type in C

2023-11-01 Thread peter0x44 via Gcc
On 2023-11-01 23:13, Joseph Myers wrote: On Wed, 1 Nov 2023, peter0x44 via Gcc wrote: Why is #define used instead of typedef? I can't imagine how this could possibly break any existing code. That's how stdbool.h is specified up to C17. In C23, bool is a keyword instead. I see, I didn't kn

Re: Suboptimal warning formatting with `bool` type in C

2023-11-01 Thread Joseph Myers
On Wed, 1 Nov 2023, peter0x44 via Gcc wrote: > Why is #define used instead of typedef? I can't imagine how this could > possibly break any existing code. That's how stdbool.h is specified up to C17. In C23, bool is a keyword instead. -- Joseph S. Myers jos...@codesourcery.com

Suboptimal warning formatting with `bool` type in C

2023-11-01 Thread peter0x44 via Gcc
Recently, I was writing some code, and noticed some slightly strange warning formatting on a function taking a `bool` parameter #include void test(bool unused) { } bruh.c: In function 'test': bruh.c:2:16: warning: unused parameter 'unused' [-Wunused-parameter] 2 | void test(bool unused)

Re: Suspecting a wrong behavior in the value range propagation analysis for __builtin_clz

2023-11-01 Thread Giuseppe Tagliavini via Gcc
Sure, I include the relevant tree dumps obtained with the "releases/gcc-11" branch. The "patch_" variants represent the dumps after disabling the check on the internal flag (I include the patch for both "releases/gcc-11" and "master" branches). The pass under investigation is "evpr"; you can see

Re: Suspecting a wrong behavior in the value range propagation analysis for __builtin_clz

2023-11-01 Thread Jeff Law via Gcc
On 11/1/23 05:29, Giuseppe Tagliavini via Gcc wrote: I found an unexpected issue working with an experimental target (available here: https://github.com/EEESlab/tricore-gcc), but I was able to reproduce it on mainstream architectures. For the sake of clarity and reproducibility, I always re

Re: Question on GIMPLE shifts

2023-11-01 Thread Andrew Pinski via Gcc
On Wed, Nov 1, 2023 at 3:56 AM Daniil Frolov wrote: > > Hi! > > When investigating bit shifts I got an incomprehensible moment with > the following example: > > int f(int x, int k) > { > int tmp = x >> k; > return (tmp & 1) << 10; > } > > If we would like to take a look into GIMPLE then

Re: GCC support addition for Safety compliances

2023-11-01 Thread Jonathan Wakely via Gcc
On Wed, 1 Nov 2023 at 09:45, Vishal B Patil wrote: > > Hi team, > > I'm using Mingw win32. My total code size is around 82MB. I'm getting error > while compilation "out of memory allocating 48 bytes" , I have attached the > snap for your reference. > > I have cleaned temp folder but not solved,

Suspecting a wrong behavior in the value range propagation analysis for __builtin_clz

2023-11-01 Thread Giuseppe Tagliavini via Gcc
I found an unexpected issue working with an experimental target (available here: https://github.com/EEESlab/tricore-gcc), but I was able to reproduce it on mainstream architectures. For the sake of clarity and reproducibility, I always refer to upstream code in the rest of the discussion. Consi

Re: False positive misleading indentation warning

2023-11-01 Thread Jonathan Wakely via Gcc
On Wed, 1 Nov 2023 at 08:12, Rene Kita wrote: > > Since I'm unable to create an account to report a bug and got no reply > from gcc-bugzilla-account-requ...@gcc.gnu.org You did get a reply. Jose Marchesi replied to you 1.5 hours after your email, but you didn't reply-all with the requested info th

Question about function Split with va_args

2023-11-01 Thread Hanke Zhang via Gcc
Hi I've been working on function splits recently, and I've noticed that functions with va_args arguments won't be split, so why is that? I tried to understand the comments in the source code, but I still don't get the specific reason. At the same time, if I do want to split functions with va_args

Question on GIMPLE shifts

2023-11-01 Thread Daniil Frolov
Hi! When investigating bit shifts I got an incomprehensible moment with the following example: int f(int x, int k) { int tmp = x >> k; return (tmp & 1) << 10; } If we would like to take a look into GIMPLE then we'll get: int f (int x, int k) { int tmp; int D.2746; int _1; int _

Re: False positive misleading indentation warning

2023-11-01 Thread Martin Uecker
I think this is the same bug already filed here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70954 Martin Am Mittwoch, dem 01.11.2023 um 09:11 +0100 schrieb Rene Kita: > Since I'm unable to create an account to report a bug and got no reply > from gcc-bugzilla-account-requ...@gcc.gnu.org I'll

False positive misleading indentation warning

2023-11-01 Thread Rene Kita
Since I'm unable to create an account to report a bug and got no reply from gcc-bugzilla-account-requ...@gcc.gnu.org I'll dump this here. Depending on the placement of a label Gcc gives a false positive warning about misleading indentation. Below is a minimal working example to reproduce and the o