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 const

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 va

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 5/1

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 co

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 els

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: 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 w

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 accomodat

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 t

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 enough

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 th

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 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 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 rathe

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 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 b

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

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 u

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: 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 = &c; int i2 = p2; Or can we generate errors for them even with -std=gnu89? (It

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&quo

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: 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: 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 the

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 ha

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 i

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 suppose

Re: Apply function attributes (e.g., [[gnu::access()]]) to pointees too

2024-07-11 Thread David Brown via Gcc
On 11/07/2024 11:58, Martin Uecker via Gcc wrote: Am Donnerstag, dem 11.07.2024 um 11:35 +0200 schrieb Alejandro Colomar via Gcc: Hi, I was wondering how we could extend attributes such as gnu::access() to apply it to pointees too. Currently, there's no way to specify the access mode of a poi

Re: feature request: a linker option to avoid merging variables from separate object files into shared cache lines

2024-10-24 Thread David Brown via Gcc
On 24/10/2024 16:35, Jonathan Wakely via Gcc wrote: On Thu, 24 Oct 2024 at 15:00, Mateusz Guzik via Gcc wrote: I understand the stock behavior of pilling variables on may happen to improve cache usage. However, in a multicore setting it is a never-ending source of unintentionally showing up a

Re: -Wfloat-equal and comparison to zero

2024-11-12 Thread David Brown via Gcc
On 12/11/2024 15:29, Sad Clouds via Gcc wrote: On Mon, 11 Nov 2024 21:14:43 + (UTC) Joseph Myers wrote: I don't think this has anything to do with whether one operand of the comparison is a constant. It's still the case when comparing with 0.0 that it's OK if your algorithm is designed su

Re: spelling of `side effects` vs `side-effects`

2024-09-24 Thread David Brown via Gcc
On 23/09/2024 22:09, Andrew Pinski via Gcc wrote: While working on the review from https://gcc.gnu.org/pipermail/gcc-patches/2024-September/663418.html . I noticed that there are places which use `side effects` and some use `side-effects`. I assume we should follow a similar pattern as `back-end`

Re: Is there a need to sometimes change gcc/config/t-* files when building a cross compiler?

2024-09-27 Thread David Brown via Gcc
On 27/09/2024 10:13, Dennis Luehring via Gcc wrote: Am 27.09.2024 um 09:56 schrieb Jonathan Wakely: On Fri, 27 Sept 2024, 08:39 Dennis Luehring, wrote: > Am 27.09.2024 um 09:34 schrieb Jonathan Wakely: > > > > They might not have > > been using the original gcc-3.4.0 sources. > > > seems to be

Re: Two suggestions for GCC beginners projects

2024-11-28 Thread David Brown via Gcc
On 28/11/2024 12:18, Aaron Peter Bachmann via Gcc wrote: Two suggestions for GCC beginners projects I watched some of the 2024 Gnu Cauldron videos. The question of what could be a suitable project for a beginner came up. I have two suggestions: 1.    Add a warning when users use reserved or p

Re: -Wfloat-equal and comparison to zero

2024-11-15 Thread David Brown via Gcc
On 13/11/2024 22:34, James K. Lowden wrote: On Thu, 14 Nov 2024 10:04:59 +0100 David Brown via Gcc wrote: No. This is - or at least appears to be - missing critical thinking. You are explaining this to someone who designed research databases and who implemented quantitative models that ran

Re: New function attribute __call_push_jmp__

2024-12-02 Thread David Brown via Gcc
On 01/12/2024 23:55, Frederick Virchanza Gotham via Gcc wrote: Some modern CPU's now have control flow enforcement. Here's how it works on Intel CPU's: "The shadow stack stores a copy of the return address of each CALL. On a RET, the processor checks if the return address stored in the normal st

Re: -Wfloat-equal and comparison to zero

2024-11-14 Thread David Brown via Gcc
On 12/11/2024 22:44, James K. Lowden wrote: On Tue, 12 Nov 2024 18:12:50 +0100 David Brown via Gcc wrote: Under what circumstances would you have code that : ... d) Would be perfectly happy with "x" having the value 2.225e-307 (or perhaps a little larger) and doing the division

<    1   2   3   4