Re: What replaces FOR_EACH_LOOP_FN

2022-03-02 Thread Marek Polacek via Gcc
On Wed, Mar 02, 2022 at 10:04:40PM +, Gary Oblock via Gcc wrote: > Guys, > > I've been working on an optimization for quite a bit of time and > in an attempt to move it to GCC 12 I found that FOR_EACH_LOOP_FN > no longer exists. I poked around in the archives and tried a Google > search but fo

Re: passing command-line arguments, still

2022-03-16 Thread Marek Polacek via Gcc
On Wed, Mar 16, 2022 at 02:34:09PM -0400, James K. Lowden wrote: > [I sent this to gcc-help by mistake. I'm reposting it here in case > anyone has a suggestion. I did take dje's advice, and deleted the build > directory, except that I preserved config.status and regenerated > Makefile. The observe

Re: passing command-line arguments, still

2022-03-17 Thread Marek Polacek via Gcc
On Thu, Mar 17, 2022 at 12:21:36PM -0400, James K. Lowden wrote: > On Wed, 16 Mar 2022 14:45:33 -0400 > Marek Polacek wrote: > > Hi Marek, > > > Let's avoid -f-foo; use -ffoo instead, like the rest of GCC. > > Sure. I hadn't noticed the distinction

Re: Buggy error message when dereferencing once a double pointer to struct

2022-05-23 Thread Marek Polacek via Gcc
On Mon, May 23, 2022 at 06:43:55PM +0200, Andrea Monaco via Gcc wrote: > > This snippet that I wrote > > > struct > str > { > int val; > }; > > > void > main (int argc, char **argv) > { > struct str **p; > int i; > > i = p->val; > } > > > is obviously inc

Re: Usage of the C++ stdlib unordered_map in GCC

2022-08-30 Thread Marek Polacek via Gcc
On Tue, Aug 30, 2022 at 09:57:45PM +0200, Tim Lange wrote: > Hello, > > I was preparing a patch for GCC and used the unordered_map from the C++ > stdlib in my patch. Later on, I noticed that it is used nowhere else inside > GCC except for some files in the go frontend. > > I wondered, now that bu

Re: C2x features status

2022-10-21 Thread Marek Polacek via Gcc
On Fri, Oct 21, 2022 at 08:31:09PM +0200, Florian Weimer via Gcc wrote: > * Joseph Myers: > > > I'm working on adding various C2x features to the C front end (and > > elsewhere in GCC as applicable). > > > > I suspect I won't get all the C2x features done for GCC 13. If anyone > > else is inter

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

2022-11-10 Thread Marek Polacek via Gcc
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 (hopefully) relevant partso f the C99 standard, > and it seems to me that C

Re: Feature request: Warning when .c file gets #include'd

2022-12-02 Thread Marek Polacek via Gcc
On Fri, Dec 02, 2022 at 03:57:44PM +0100, Jiří Wolker via Gcc wrote: > > Hi, > > I've met a guy that is learning C and got stuck when the linker produced > a screenful of messages about that he did something define multiple > times. The cause of the problem was trivial: > > He did ``#include

Re: No warning about duplicate values in enum

2023-03-10 Thread Marek Polacek via Gcc
On Fri, Mar 10, 2023 at 01:57:06PM +0100, Andrea Monaco via Gcc wrote: > > In gcc 8.3.0, compiling > > > enum > test > { > FIRST = 1, > SECOND = 1, > THIRD = 2 > }; > > int > main (void) > { > return 0; > } > > > generates no warning even with -Wextra. That hit me today, be

Re: No warning about duplicate values in enum

2023-03-13 Thread Marek Polacek via Gcc
On Sat, Mar 11, 2023 at 04:48:14PM +, Jonathan Wakely via Gcc wrote: > On Sat, 11 Mar 2023, 12:53 Basile Starynkevitch, > wrote: > > > Hello all, > > > > > > Andrea observed that: > > > > In gcc 8.3.0, compiling > > > > > > enum > > test > >{ > > FIRST = 1, > > SECOND = 1, > >

Re: lambda coding style

2024-01-10 Thread Marek Polacek via Gcc
On Wed, Jan 10, 2024 at 02:58:03PM -0500, Jason Merrill via Gcc wrote: > What formatting style do we want for non-trivial lambdas in GCC sources? > I'm thinking the most consistent choice would be > > auto l = [&] (parms) // space between ] ( > { // brace on new line, indented t

Re: lambda coding style

2024-01-10 Thread Marek Polacek via Gcc
On Wed, Jan 10, 2024 at 04:24:42PM -0500, Jason Merrill wrote: > On 1/10/24 15:59, Marek Polacek wrote: > > On Wed, Jan 10, 2024 at 02:58:03PM -0500, Jason Merrill via Gcc wrote: > > > What formatting style do we want for non-trivial lambdas in GCC sources? > > > I

Re: [attribs.cc] ICE with 4x underscores

2024-01-30 Thread Marek Polacek via Gcc
On Tue, Jan 30, 2024 at 12:25:24PM +, Jonathan Wakely via Gcc wrote: > On Tue, 30 Jan 2024, 10:35 Amol Surati via Gcc, wrote: > > > Hello, > > > > If a std attribute name is squeezed between 4x underscores, > > > > Which is undefined behaviour, but shouldn't crash. > > the compiler (both 13

<    1   2