Re: How to avoid some built-in expansions in gcc?

2024-06-05 Thread David Brown via Gcc
On 04/06/2024 19:43, Michael Matz via Gcc wrote: Hello, On Tue, 4 Jun 2024, Richard Biener wrote: A pragmatic solution might be a new target hook, indicating a specified builtin is not to be folded into an open-coded form. Well, that's what the mechanism behind -fno-builtin-foobar is

Re: Is fcommon related with performance optimization logic?

2024-05-30 Thread David Brown via Gcc
On 30/05/2024 04:26, Andrew Pinski via Gcc wrote: On Wed, May 29, 2024 at 7:13 PM 赵海峰 via Gcc wrote: Dear Sir/Madam, We found that running on intel SPR UnixBench compiled with gcc 10.3 performs worse than with gcc 8.5 for dhry2reg benchmark. I found it related with -fcommon option which

Re: aliasing

2024-03-18 Thread David Brown via Gcc
On 18/03/2024 14:54, Andreas Schwab via Gcc wrote: On Mär 18 2024, David Brown wrote: I think it would be possible to have an implementation where "signed char" was 8-bit two's complement except that 0x80 would be a trap representation rather than -128. signed char cannot have padding bits,

Re: issue: unexpected results in optimizations

2023-12-12 Thread David Brown via Gcc
Hi, First, please ignore everything Dave Blanchard writes. I don't know why, but he likes to post angry, rude and unhelpful messages to this list. Secondly, this is the wrong list. gcc-help would be the correct list, as you are asking for help with gcc. This list is for discussions on

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

2023-11-02 Thread David Brown via Gcc
On 02/11/2023 00:28, peter0x44 via Gcc wrote: 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,

Re: C89 question: Do we need to accept -Wint-conversion warnings

2023-10-11 Thread David Brown via Gcc
On 11/10/2023 12:17, Florian Weimer wrote: * David Brown: On 11/10/2023 10:10, Florian Weimer wrote: * David Brown: So IMHO (and as I am not a code contributor to GCC, my opinion really is humble) it is better to be stricter than permissive, even in old standards. It is particularly

Re: C89 question: Do we need to accept -Wint-conversion warnings

2023-10-11 Thread David Brown via Gcc
On 11/10/2023 10:10, Florian Weimer wrote: * David Brown: So IMHO (and as I am not a code contributor to GCC, my opinion really is humble) it is better to be stricter than permissive, even in old standards. It is particularly important for "-std=c89", while "-std=gnu89" is naturally more

Re: C89 question: Do we need to accept -Wint-conversion warnings

2023-10-11 Thread David Brown via Gcc
On 10/10/2023 18:30, Jason Merrill via Gcc wrote: On Tue, Oct 10, 2023 at 7:30 AM Florian Weimer via Gcc wrote: Are these code fragments valid C89 code? int i1 = 1; char *p1 = i; char c; char *p2 = int i2 = p2; Or can we generate errors for them even with -std=gnu89? (It

Re: GCC support addition for Safety compliances

2023-07-12 Thread David Brown via Gcc
On 12/07/2023 14:43, Jonathan Wakely via Gcc wrote: On Wed, 12 Jul 2023 at 10:25, Vishal B Patil via Gcc wrote: Hi Team, Any updates ? You're not going to get any useful answers. You asked "Please share the costs and time as well." Costs for what? From whom? GCC is an open-source project

Re: user sets ABI

2023-07-07 Thread David Brown via Gcc
On 07/07/2023 00:27, André Albergaria Coelho via Gcc wrote: What if the user chooses in own ABI, say specifying a config file like My abi " Parameters = pushed in stack" say gcc -abi "My abi" some.c -o some what would be the problems of specifying an ABI?? would that improve the usage of

Re: wishlist: support for shorter pointers

2023-07-06 Thread David Brown via Gcc
On 06/07/2023 09:00, Rafał Pietrak via Gcc wrote: Hi, W dniu 5.07.2023 o 19:39, David Brown pisze: [--] I'm not sure what this means? At compile time, you only have literals, so what's missing? The compiler knows a lot more than just literal values at compile time - lots of

Re: wishlist: support for shorter pointers

2023-07-05 Thread David Brown via Gcc
On 05/07/2023 18:13, Rafał Pietrak via Gcc wrote: Hi, W dniu 5.07.2023 o 16:45, David Brown pisze: On 05/07/2023 15:29, Rafał Pietrak wrote: [---] OK. I don't see a problem here, but I admit that mixing semantics often lead to problems. I think it also allows better

Re: wishlist: support for shorter pointers

2023-07-05 Thread David Brown via Gcc
On 05/07/2023 15:29, Rafał Pietrak wrote: Hi, W dniu 5.07.2023 o 14:57, David Brown pisze: [] My objection to named address spaces stem from two points: 1. They are compiler implementations, not user code (or library code), which means development is inevitably much slower and

Re: wishlist: support for shorter pointers

2023-07-05 Thread David Brown via Gcc
On 05/07/2023 14:25, Rafał Pietrak wrote: Hi, W dniu 5.07.2023 o 13:55, David Brown pisze: On 05/07/2023 11:42, Rafał Pietrak via Gcc wrote: [--] So your current objections to named spaces ... are in fact in favor of them. Isn't it so? Not really, no - I would rather see

Re: wishlist: support for shorter pointers

2023-07-05 Thread David Brown via Gcc
On 05/07/2023 11:42, Rafał Pietrak via Gcc wrote: Hi, W dniu 5.07.2023 o 11:11, David Brown pisze: On 05/07/2023 10:05, Rafał Pietrak via Gcc wrote: [---] I am not sure if you are clear about this, but the address space definition macros here are for use in the source code for the

Re: wishlist: support for shorter pointers

2023-07-05 Thread David Brown via Gcc
On 05/07/2023 11:25, Martin Uecker wrote: Am Mittwoch, dem 05.07.2023 um 11:11 +0200 schrieb David Brown: On 05/07/2023 10:05, Rafał Pietrak via Gcc wrote: ... In my personal opinion (which you are all free to disregard), named address spaces were an interesting idea that failed.  I was

Re: wishlist: support for shorter pointers

2023-07-05 Thread David Brown via Gcc
On 05/07/2023 10:05, Rafał Pietrak via Gcc wrote: Hi, W dniu 5.07.2023 o 09:29, Martin Uecker pisze: Am Mittwoch, dem 05.07.2023 um 07:26 +0200 schrieb Rafał Pietrak: [---] And if it's so ... there is no mention of how does it show up for "simple user" of the GCC (instead of the use of

Re: wishlist: support for shorter pointers

2023-07-04 Thread David Brown via Gcc
On 04/07/2023 16:46, Rafał Pietrak wrote: Hi, W dniu 4.07.2023 o 14:38, David Brown pisze: [-] A key difference is that using 32-bit pointers on an x86 is enough address space for a large majority of use-cases, while even on the smallest small ARM microcontroller, 16-bit is not

Re: wishlist: support for shorter pointers

2023-07-04 Thread David Brown via Gcc
On 04/07/2023 16:20, Rafał Pietrak wrote: W dniu 3.07.2023 o 18:29, Rafał Pietrak pisze: Hi David, [--] 4. It is worth taking a step back, and thinking about how you would like to use these pointers.  It is likely that you would be better thinking in terms of an array, rather

Re: wishlist: support for shorter pointers

2023-07-04 Thread David Brown via Gcc
On 03/07/2023 18:42, Rafał Pietrak via Gcc wrote: Hi Ian, W dniu 3.07.2023 o 17:07, Ian Lance Taylor pisze: On Wed, Jun 28, 2023 at 11:21 PM Rafał Pietrak via Gcc wrote: [] I was thinking about that, and it doesn't look as requiring that deep rewrites. ABI spec, that  could

Re: wishlist: support for shorter pointers

2023-07-03 Thread David Brown via Gcc
On 28/06/2023 10:35, Rafał Pietrak via Gcc wrote: Hi Jonathan, W dniu 28.06.2023 o 09:31, Jonathan Wakely pisze: If you use a C++ library type for your pointers the syntax above doesn't need to change, and the fancy pointer type can be implemented portable, with customisation for targets

Re: Will GCC eventually learn to use BSR or even TZCNT on AMD/Intel processors?

2023-06-06 Thread David Brown via Gcc
On 06/06/2023 14:53, Paul Smith wrote: On Tue, 2023-06-06 at 16:36 +0800, Julian Waters via Gcc wrote: Sorry for my outburst, to the rest of this list. I can no longer stay silent and watch these little shits bully people who are too kind to fire back with the same kind of venom in their words.

Re: Will GCC eventually learn to use BSR or even TZCNT on AMD/Intel processors?

2023-06-06 Thread David Brown via Gcc
On 06/06/2023 02:09, Dave Blanchard wrote: If this guy's threads are such a terrible waste of your time, how about employing your email client's filters to ignore his posts (and mine too) and fuck off? You apparently appreciate Stefan's posts, but burst a blood vessel when reading anyone

Re: Will GCC eventually support SSE2 or SSE4.1?

2023-05-26 Thread David Brown via Gcc
On 26/05/2023 17:49, Stefan Kanthak wrote: I don't like to argue with idiots: they beat me with experience! Stefan Stefan, you are clearly not happy about the /free/ compiler you are using, and its /free/ documentation (which, despite its flaws, is better than I have seen for most other

Re: [wish] Flexible array members in unions

2023-05-12 Thread David Brown via Gcc
On 12/05/2023 08:16, Richard Biener via Gcc wrote: On Thu, May 11, 2023 at 11:14 PM Kees Cook via Gcc wrote: On Thu, May 11, 2023 at 08:53:52PM +, Joseph Myers wrote: On Thu, 11 May 2023, Kees Cook via Gcc wrote: On Thu, May 11, 2023 at 06:29:10PM +0200, Alejandro Colomar wrote: On

Re: More C type errors by default for GCC 14

2023-05-12 Thread David Brown via Gcc
On 12/05/2023 04:08, Po Lu via Gcc wrote: Eli Schwartz writes: Because that's exactly what is going on here. Features that were valid C89 code are being used in a GNU99 or GNU11 code file, despite that ***not*** being valid GNU99 or GNU11 code. How GCC currently behaves defines what is

Re: More C type errors by default for GCC 14

2023-05-11 Thread David Brown via Gcc
On 11/05/2023 04:09, Po Lu via Gcc wrote: jwakely@gmail.com (Jonathan Wakely) writes: So let's do it. Let's write a statement saying that the GCC developers consider software security to be of increasing importance, and that we consider it irresponsible to default to accepting invalid

Re: More C type errors by default for GCC 14

2023-05-10 Thread David Brown via Gcc
On 10/05/2023 16:39, Eli Zaretskii via Gcc wrote: Date: Wed, 10 May 2023 15:30:02 +0200 From: David Brown via Gcc If some developers want to ignore warnings, it is not the business of GCC to improve them, even if you are right in assuming that they will not work around errors like they work

Re: More C type errors by default for GCC 14

2023-05-10 Thread David Brown via Gcc
On 10/05/2023 16:14, Eli Zaretskii via Gcc wrote: Date: Wed, 10 May 2023 14:41:27 +0200 Cc: jwakely@gmail.com, fwei...@redhat.com, gcc@gcc.gnu.org, ar...@aarsen.me From: Gabriel Ravier Because GCC is capable of compiling it. That is not a good argument. GCC is capable of compiling any

Re: More C type errors by default for GCC 14

2023-05-10 Thread David Brown via Gcc
On 10/05/2023 15:10, Basile Starynkevitch wrote: Hello all, After a suggestion by Eric Gallager Idea for a compromise: What if, instead of flipping the switch on all 3 of these at once, we staggered them so that each one becomes a default in a separate release? i.e., something like: - GCC 14:

Re: More C type errors by default for GCC 14

2023-05-10 Thread David Brown via Gcc
On 10/05/2023 14:22, Eli Zaretskii via Gcc wrote: From: Jonathan Wakely Date: Wed, 10 May 2023 12:49:52 +0100 Cc: David Brown , gcc@gcc.gnu.org If some developers want to ignore warnings, it is not the business of GCC to improve them, even if you are right in assuming that they will not work

Re: More C type errors by default for GCC 14

2023-05-10 Thread David Brown via Gcc
On 09/05/2023 22:13, David Edelsohn via Gcc wrote: On Tue, May 9, 2023 at 3:22 PM Eli Zaretskii via Gcc wrote: Date: Tue, 9 May 2023 21:07:07 +0200 From: Jakub Jelinek Cc: Jonathan Wakely , ar...@aarsen.me, gcc@gcc.gnu.org On Tue, May 09, 2023 at 10:04:06PM +0300, Eli Zaretskii via Gcc

Re: More C type errors by default for GCC 14

2023-05-10 Thread David Brown via Gcc
On 09/05/2023 21:04, Eli Zaretskii via Gcc wrote: From: Jonathan Wakely Date: Tue, 9 May 2023 18:15:59 +0100 Cc: Arsen Arsenović , gcc@gcc.gnu.org On Tue, 9 May 2023 at 17:56, Eli Zaretskii wrote: No one has yet explained why a warning about this is not enough, and why it must be made an

Re: [BUG] -Wuninitialized: initialize variable with itself

2022-11-14 Thread David Brown via Gcc
On 14/11/2022 16:10, NightStrike wrote: On Mon, Nov 14, 2022, 04:42 David Brown via Gcc Warnings are not perfect - there is always the risk of false positives and false negatives.  And different people will have different ideas about what code is perfectly reasonable

Re: [BUG] -Wuninitialized: initialize variable with itself

2022-11-14 Thread David Brown via Gcc
On 13/11/2022 19:43, Alejandro Colomar via Gcc wrote: Hi Andrew! On 11/13/22 19:41, Andrew Pinski wrote: On Sun, Nov 13, 2022 at 10:40 AM Andrew Pinski wrote: On Sun, Nov 13, 2022 at 10:36 AM Alejandro Colomar via Gcc wrote: Hi, While discussing some idea for a new feature, I tested the

Re: -Wint-conversion, -Wincompatible-pointer-types, -Wpointer-sign: Are they hiding constraint C violations?

2022-11-11 Thread David Brown via Gcc
On 10/11/2022 20:16, Florian Weimer via Gcc wrote: * Marek Polacek: On Thu, Nov 10, 2022 at 07:25:21PM +0100, Florian Weimer via Gcc wrote: GCC accepts various conversions between pointers and ints and different types of pointers by default, issuing a warning. I've been reading the

Re: Local type inference with auto is in C2X

2022-11-04 Thread David Brown via Gcc
On 03/11/2022 16:19, Michael Matz via Gcc wrote: Hello, On Thu, 3 Nov 2022, Florian Weimer via Gcc wrote: will not have propagated widely once GCC 13 releases, so rejecting implicit ints in GCC 13 might be too early. GCC 14 might want to switch to C23/C24 mode by default, activating auto

Re: Gcc Digest, Vol 29, Issue 7

2022-07-06 Thread David Brown via Gcc
On 05/07/2022 09:19, Yair Lenga via Gcc wrote: Hi, Wanted to get some feedback on an idea that I have - trying to address the age long issue with type check on VA list function - like 'scanf' and friends. In my specific case, I'm trying to build code that will parse a list of values from SELECT