Scaling -fmacro-prefix-map= to thousands entries

2023-10-04 Thread Sergei Trofimovich via Gcc
Hi gcc developers! Tl;DR: I would like to implement a scalable way to pass `-fmacro-prefix-map=` for `NixOS` distribution to avoid leaking build-time paths generated by `__FILE__` macros used by various libraries. I need some guidance what path to take to be acceptable for `gcc` upstream. I hav

-Wint-conversion as errors seems doable for GCC 14

2023-10-04 Thread Florian Weimer via Gcc
I completed a Fedora rawhide rebuild with an instrumented GCC (~14,500 packages). 156 packages failed to build with a logged -Wint-conversion error. This number is much lower than what I expected, and I think we should include -Wint-conversion in the GCC 14 changes. My instrumentation isn't very

Re: Function return value can't be infered when it's not inlined

2023-10-04 Thread Richard Biener via Gcc
> Am 04.10.2023 um 16:16 schrieb Hanke Zhang : > > Richard Biener 于2023年10月4日周三 16:43写道: >> >>> On Wed, Oct 4, 2023 at 10:37 AM Richard Biener >>> wrote: >>> >>> On Tue, Oct 3, 2023 at 6:30 PM Hanke Zhang via Gcc wrote: Hi, I'm a little confused about the behavior of gcc when t

Re: Question about function splitting

2023-10-04 Thread Hanke Zhang via Gcc
But when I change the code 'opstatus = rand()' to 'opstatus = rand() %2', the probability of opstatus being 0 should be 50%, but the result remains the same, i.e. still split at that point. And the specific information can be found in Bugzilla, the link is https://gcc.gnu.org/bugzilla/show_bug.cgi

Re: Function return value can't be infered when it's not inlined

2023-10-04 Thread Hanke Zhang via Gcc
Richard Biener 于2023年10月4日周三 16:43写道: > > On Wed, Oct 4, 2023 at 10:37 AM Richard Biener > wrote: > > > > On Tue, Oct 3, 2023 at 6:30 PM Hanke Zhang via Gcc wrote: > > > > > > Hi, I'm a little confused about the behavior of gcc when the function > > > is not inlined. > > > > > > Here is an examp

[no subject]

2023-10-04 Thread bandar Assaf via Gcc
‏‫من الـ iPhone الخاص

Re: Question about merging if-else blocks

2023-10-04 Thread Florian Weimer via Gcc
* Richard Biener: >> By disassembling the exe file generated by icc, I found that icc will >> merge these two blocks with the example code below. So I think there >> maybe some ways to make it. > > ... glibc for example allows user-provided printf format callbacks so > printf might call back into

Re: contrib/reghunt documentation

2023-10-04 Thread Jonathan Wakely via Gcc
On Wed, 4 Oct 2023 at 09:04, Richard Biener via Gcc wrote: > > On Sun, Oct 1, 2023 at 9:20 PM Thomas Koenig via Gcc wrote: > > > > Hi, > > > > is there some sort of concise explanation of how to use the > > scripts in contrib/reghunt? There is no real documentation > > for what is in the directo

Re: Function return value can't be infered when it's not inlined

2023-10-04 Thread Richard Biener via Gcc
On Wed, Oct 4, 2023 at 10:37 AM Richard Biener wrote: > > On Tue, Oct 3, 2023 at 6:30 PM Hanke Zhang via Gcc wrote: > > > > Hi, I'm a little confused about the behavior of gcc when the function > > is not inlined. > > > > Here is an example code: > > > > int __attribute__((noinline)) foo() { > >

Re: Function return value can't be infered when it's not inlined

2023-10-04 Thread Richard Biener via Gcc
On Tue, Oct 3, 2023 at 6:30 PM Hanke Zhang via Gcc wrote: > > Hi, I'm a little confused about the behavior of gcc when the function > is not inlined. > > Here is an example code: > > int __attribute__((noinline)) foo() { > return 1; > } > > int main() { > if (foo()) { > printf("foo

Re: Question about function splitting

2023-10-04 Thread Richard Biener via Gcc
On Mon, Oct 2, 2023 at 7:15 PM Hanke Zhang via Gcc wrote: > > Martin Jambor 于2023年10月3日周二 00:34写道: > > > > Hello, > > > > On Mon, Oct 02 2023, Hanke Zhang via Gcc wrote: > > > Hi, I have some questions about the strategy and behavior of function > > > splitting in gcc, like the following code: >

Re: contrib/reghunt documentation

2023-10-04 Thread Richard Biener via Gcc
On Sun, Oct 1, 2023 at 9:20 PM Thomas Koenig via Gcc wrote: > > Hi, > > is there some sort of concise explanation of how to use the > scripts in contrib/reghunt? There is no real documentation > for what is in the directory, specifically not how to invoke > them, and which directory to invoke the

Re: Question about merging if-else blocks

2023-10-04 Thread Richard Biener via Gcc
On Sun, Oct 1, 2023 at 6:13 AM Hanke Zhang wrote: > > Richard Biener 于2023年9月27日周三 15:30写道: > > > > On Wed, Sep 27, 2023 at 7:21 AM Hanke Zhang via Gcc wrote: > > > > > > Thanks! I understand what you mean, then can I think that if the > > > function here is not an external function, but a funct