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

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: 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: 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: 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: 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: -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: 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: 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: 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: 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: 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: 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: How to run C++ IPA tests?

2021-10-27 Thread Marek Polacek via Gcc
On Wed, Oct 27, 2021 at 04:29:32PM +0200, Erick Ochoa via Gcc wrote: > Hi, > > I have been adding tests to the gcc/testsuite/gcc.dg/ipa folder > successfully for a while now. I am starting to add some tests into > gcc/testsuite/g++.dg/ipa now but I am having some issues. > > 1. Using `make check-

Re: where is PRnnnn required again?

2021-07-07 Thread Marek Polacek via Gcc
gt; > > > > > > > > On Tue, 6 Jul 2021, 22:45 Martin Sebor via Gcc, > <mailto:gcc@gcc.gnu.org> > > > <mailto:gcc@gcc.gnu.org <mailto:gcc@gcc.gnu.org>>> wrote: > > > > > >     On 7/6/21 3

Re: where is PRnnnn required again?

2021-07-06 Thread Marek Polacek via Gcc
On Tue, Jul 06, 2021 at 03:20:26PM -0600, Martin Sebor via Gcc wrote: > I came away from the recent discussion of ChangeLogs requirements > with the impression that the PR bit should be in the subject > (first) line and also above the ChangeLog part but doesn't need > to be repeated again in th

Re: help debug hash_map garbage collection issue

2021-04-20 Thread Marek Polacek via Gcc
On Tue, Apr 20, 2021 at 02:03:00PM -0600, Martin Sebor via Gcc wrote: > I have a static hash_map object that needs to persist across passes: > > static GTY(()) hash_map *map; > > I initialize the map like so: > > map = hash_map::create_ggc (4); > > But I see crashes when accessing the map a

Re: Remove RMS from the GCC Steering Committee

2021-03-26 Thread Marek Polacek via Gcc
On Fri, Mar 26, 2021 at 04:02:30PM -0400, Nathan Sidwell wrote: > [double sigh, attaching a pdf causes it to be blocked, and I guess the > number of URLs is also triggering a spam trap for the follow up. I have > removed many of the URLS from this, you'll have to use your google-fu for > sources.

Re: What is pex_run

2021-02-25 Thread Marek Polacek via Gcc
On Thu, Feb 25, 2021 at 09:57:55PM +, Gary Oblock via Gcc wrote: > I've got collect2 finding a linker error and I'm out of > other options so I'm poking around in the collect2 > sources. I'm wondering what pex_run is (since it's > getting handed the arguments this might mater?) See libiberty/p

Re: is there a reason why "explicit specialization in non-namespace scope" is still an error in gcc-trunk?

2020-09-23 Thread Marek Polacek via Gcc
On Wed, Sep 23, 2020 at 02:42:01PM +0200, Dennis Luehring wrote: > i've read that scoped template specalization is allowed in C++17 > > > clang supports it starting with release 7 > > MSVC supports it with VS2017(i don't know what revision) > > Intel does not like it Because CWG 727 isn't impl

Re: gcc __attribute__

2020-08-06 Thread Marek Polacek via Gcc
On Thu, Aug 06, 2020 at 04:15:10PM +0100, Philip R Brenan via Gcc wrote: > Hi *GCC*: > > On page: > > https://gcc.gnu.org/onlinedocs/gcc-3.2/gcc/Function-Attributes.html > > you show the attribute coming after the parameter list. But when I try > this, I get the following: That manual is for

Re: [IMPORTANT] ChangeLog related changes

2020-06-10 Thread Marek Polacek via Gcc
On Wed, Jun 10, 2020 at 01:34:54PM +, Tamar Christina wrote: > Hi All, > > We've been wondering since we no longer list authors in the changelog (at > least mklog doesn't generate it), > How do we handle multi author patches nowadays? > > Tried searching for it on the website but couldn’t fi

Re: ERR: file not changed in a patch:"gcc/cp/cp-tree.c"

2020-05-19 Thread Marek Polacek via Gcc
On Tue, May 19, 2020 at 01:03:09PM -0600, Martin Sebor via Gcc wrote: > I'm having trouble with the commit hook that tries to enforce > ChangeLog contents. It fails with an error that doesn't make > sense to me: the file it complains isn't mentioned clearly is > listed there and I can't tell what

Re: New mklog script

2020-05-15 Thread Marek Polacek via Gcc
On Fri, May 15, 2020 at 03:12:27PM +0200, Martin Liška wrote: > On 5/15/20 2:42 PM, Marek Polacek wrote: > > I actually use mklog -i all the time. But I can work around it if it > > disappears. > > Ah, I can see a consumer. > There's an updated version that suppo

Re: New mklog script

2020-05-15 Thread Marek Polacek via Gcc
uthor nor date stamp is used - that all can be get from git This is good. > - --inline option is not supported - I don't see a use-case for it now I actually use mklog -i all the time. But I can work around it if it disappears. -- Marek Polacek • Red Hat, Inc. • 300 A St, Boston, MA

Re: commits in Bugzilla attributed to others?

2020-03-13 Thread Marek Polacek via Gcc
On Fri, Mar 13, 2020 at 09:56:58AM -0600, Martin Sebor wrote: > On 3/13/20 9:50 AM, Marek Polacek wrote: > > On Fri, Mar 13, 2020 at 09:46:40AM -0600, Martin Sebor via Gcc wrote: > > > It looks as though commits with bug fixes appear in Bugzilla comments > > > made

Re: commits in Bugzilla attributed to others?

2020-03-13 Thread Marek Polacek via Gcc
On Fri, Mar 13, 2020 at 09:46:40AM -0600, Martin Sebor via Gcc wrote: > It looks as though commits with bug fixes appear in Bugzilla comments > made by others(*). Fox instance, commit r10-7151 for PR 92071 shows > in comment #16 on the bug under Martin Liška's name. > > https://gcc.gnu.org/bugz

Re: Warning on move and dereference of unique_ptr in the same expression

2020-02-03 Thread Marek Polacek
On Mon, Feb 03, 2020 at 09:26:40PM +0100, Allan Sandfeld Jensen wrote: > Hello gcc > > I have now twice hit obscure bugs in Chromium that crashed on some compilers > but not on others, and didn't produce any warnings on any compiler. I would > like to know if this code is as undefined as I think

Re: [PATCH, v2] wwwdocs: e-mail subject lines for contributions

2020-01-22 Thread Marek Polacek
On Wed, Jan 22, 2020 at 04:05:37PM +, Richard Sandiford wrote: > "Richard Earnshaw (lists)" writes: > > On 21/01/2020 17:20, Jason Merrill wrote: > >> On 1/21/20 10:40 AM, Richard Earnshaw (lists) wrote: > >>> On 21/01/2020 15:39, Jakub Jelinek wrote: > On Tue, Jan 21, 2020 at 03:33:22PM

Re: GCC static analysis branch now available on Compiler Explorer

2019-12-10 Thread Marek Polacek
a, > even though this is still on a branch? (with me as default assignee) I think so, we have it for e.g. JIT already, and it's probably just a matter of time before the analyzer is merged. -- Marek Polacek • Red Hat, Inc. • 300 A St, Boston, MA

Re: [RFC] Characters per line: from punch card (80) to line printer (132) (was: [Patch][OpenMP/OpenACC/Fortran] Fix mapping of optional (present|absent) arguments)

2019-12-05 Thread Marek Polacek
I disagree, it is a nice feature, without quotes. It's Good Style not to leak variables into enclosing scopes. > If you have issues with scoping your functions are WAY too long already. I don't think that's the case here. -- Marek Polacek • Red Hat, Inc. • 300 A St, Boston, MA

Re: [RFC] Characters per line: from punch card (80) to line printer (132) (was: [Patch][OpenMP/OpenACC/Fortran] Fix mapping of optional (present|absent) arguments)

2019-12-05 Thread Marek Polacek
On Thu, Dec 05, 2019 at 05:03:43PM +, Jonathan Wakely wrote: > On Thu, 5 Dec 2019 at 16:44, Michael Matz wrote: > > > > Hello, > > > > (oh a flame bait :) ) > > > > On Thu, 5 Dec 2019, Thomas Schwinge wrote: > > > > > So, I formally propose that we lift this characters per line restriction > >

Re: Commit messages and the move to git

2019-11-05 Thread Marek Polacek
On Tue, Nov 05, 2019 at 11:27:50AM +, Jason Merrill wrote: > On Tue, Nov 5, 2019 at 11:07 AM Jonathan Wakely wrote: > > On Mon, 4 Nov 2019 at 17:42, Joseph Myers wrote: > > > On Mon, 4 Nov 2019, Segher Boessenkool wrote: > > > > > > > On Mon, Nov 04, 2019 at 04:19:25PM +, Jonathan Wakely w

Re: GCC 10.0 Status Report (2019-10-22), Stage 1 to end Nov 16th

2019-11-01 Thread Marek Polacek
On Fri, Nov 01, 2019 at 09:31:07AM -0600, Jeff Law wrote: > On 11/1/19 9:08 AM, Marek Polacek wrote: > > On Fri, Nov 01, 2019 at 04:01:12PM +0100, Romain Geissler wrote: > >> Le mar. 22 oct. 2019 à 14:53, Richard Biener a écrit : > >>> > >>> Please mak

Re: GCC 10.0 Status Report (2019-10-22), Stage 1 to end Nov 16th

2019-11-01 Thread Marek Polacek
t in gcc 10 ? Or gcc 11 ? However I fear doing that may break > some tests in the testsuite, I hope not too many. I plan to propose a switch to -std=gnu++17 in GCC 11. I think it's way too late for GCC 10. Dealing with the testsuite fallout, and rebuilding Fedora packages is of course part o

Re: Boost build broken due to recent C++ change?

2019-09-24 Thread Marek Polacek
On Tue, Sep 24, 2019 at 10:16:27PM +, Steve Ellcey wrote: > A recent g++ change (I haven't tracked down exactly which one, but in > the last day or two) seems to have broken my boost build. It is dying > with lots of errors like: > > ./boost/intrusive/list.hpp:1448:7: required from here > .

Re: [PATCH] Deprecate -frepo option.

2019-09-06 Thread Marek Polacek
On Fri, Sep 06, 2019 at 08:58:48AM +0200, Martin Liška wrote: > Ok, hopefully nobody is strongly against. I've just retested the > patch and installed it as r275450. --- a/gcc/c-family/c.opt +++ b/gcc/c-family/c.opt @@ -1763,8 +1763,8 @@ ObjC ObjC++ LTO Var(flag_replace_objc_classes) Used in Fix-

Re: Delayed warning

2019-04-29 Thread Marek Polacek
On Mon, Apr 29, 2019 at 08:39:57AM -0600, Jeff Law wrote: > On 4/29/19 8:24 AM, Thomas Koenig wrote: > > Hi! > > > > Is there a way to mark a TREE statement (or a variable) so that > > a warning is issued at a later stage if the statement has not been > > removed in the meantime? > > > > I am thi

Re: Implementing p0515 - spaceship operator

2018-08-30 Thread Marek Polacek
On Thu, Aug 30, 2018 at 08:07:05PM +0200, Jakub Jelinek wrote: > On Thu, Jan 11, 2018 at 02:06:06PM +, Joseph Myers wrote: > > On Thu, 11 Jan 2018, David Brown wrote: > > > > > Maybe it is easier to say "gcc supports <=> in C++2a, and as an > > > extension also supports it in C and C++ of any

Re: Wabi warnings during GCC build

2018-06-27 Thread Marek Polacek
On Wed, Jun 27, 2018 at 08:53:48AM -0700, Steve Ellcey wrote: > Are other people building GCC seeing these messages during the build: > > cc1plus: warning: -Wabi won't warn about anything [-Wabi] > cc1plus: note: -Wabi warns about differences from the most up-to-date ABI, > which is also used by

Re: Next question: sizeof(char buf[2042])

2018-06-20 Thread Marek Polacek
On Wed, Jun 20, 2018 at 11:47:45AM -0700, Bruce Korb wrote: > Yeah, I guess this is Clang, but is it a legal interpretation for Clang? > > In file included from gnu-pw-mgr.c:24: > > In file included from ./fwd.h:288: > > *./seed.c:178:43: **warning: **sizeof on pointer operation will return size

Re: FYI: Latest gcc-8 snapshot gives ICE with later isl's

2018-03-05 Thread Marek Polacek
On Mon, Mar 05, 2018 at 12:58:23PM -0500, Donald Parsons wrote: > > I am getting ICE bootstrapping gcc-8-20180304.tar.xz when using either > isl-0.18 or isl-0.19. I had never had a problem using latest isl over > the past couple of years, so a change in gcc last week introduced the > problem. >

Re: Segfault generated by gcc-7

2017-08-29 Thread Marek Polacek
On Tue, Aug 29, 2017 at 12:31:39PM +0200, Marco Varlese wrote: > Hi, > > I got a SEGFAULT in my program when compiling it with gcc-7 but it > is/was all good when using gcc-6. > > The SEGFAULT happens due to the line below: > d_point = *p; > > And a fix for it (with gcc-7) has been: > memcpy(&d_

Re: tests for GCC internal functions

2017-08-16 Thread Marek Polacek
On Wed, Aug 16, 2017 at 08:46:20AM -0600, Martin Sebor wrote: > Is there a setup for writing and running as part of the test > suite unit tests that exercise internal GCC functions like > error and warning? I ask because of a couple of bugs that > were recently reported for the %s directive in GCC

Re: https://gcc.gnu.org/gcc-7/changes.html

2017-07-11 Thread Marek Polacek
On Tue, Jul 11, 2017 at 09:51:19AM -0700, Jonny Grant wrote: > Hello > https://gcc.gnu.org/gcc-7/changes.html > > snprintf (d, sizeof d, "%#02x", x & 0xff); > >^^ > Should be: sizeof(d) ? Why? Both are correct. Marek

Re: Getting spurious FAILS in testsuite?

2017-06-01 Thread Marek Polacek
On Thu, Jun 01, 2017 at 02:59:37PM +0200, Georg-Johann Lay wrote: > Hi, when I am running the gcc testsuite in $builddir/gcc then > > $ make check-gcc RUNTESTFLAGS='ubsan.exp' > > comes up with spurious fails. > > Running target unix > Using /usr/share/dejagnu/baseboards/unix.exp as board descri

Re: Help with rich_location and GIMPLE stmts

2017-05-19 Thread Marek Polacek
On Thu, May 18, 2017 at 01:22:02PM +0200, Martin Liška wrote: > On 05/16/2017 09:14 PM, David Malcolm wrote: > > On Mon, 2017-05-15 at 15:36 +0200, Martin Liška wrote: > >> Hi. > >> > >> I sent this email to David some time ago, but it should be probably > >> answered > >> on gcc mailing list. > >

Re: comparing parallel test runs

2017-05-18 Thread Marek Polacek
On Thu, May 18, 2017 at 05:22:50PM -0600, Martin Sebor wrote: > On 05/17/2017 11:19 PM, Andi Kleen wrote: > > Marek Polacek writes: > > > > > On Wed, May 17, 2017 at 09:13:40AM -0600, Jeff Law wrote: > > > > On 05/17/2017 04:23 AM, Aldy

Re: comparing parallel test runs

2017-05-17 Thread Marek Polacek
On Wed, May 17, 2017 at 09:13:40AM -0600, Jeff Law wrote: > On 05/17/2017 04:23 AM, Aldy Hernandez wrote: > > Hi folks. > > > > I've been having troubles comparing the results of different test runs > > for quite some time, and have finally decided to whine about it. Perhaps > > someone can point

Re: 'make check' questions

2017-05-11 Thread Marek Polacek
On Thu, May 11, 2017 at 11:50:21AM +0100, Kyrill Tkachov wrote: > > On 11/05/17 11:43, Simon Wright wrote: > > I see from https://gcc.gnu.org/install/test.html that it's possible to run > > tests in parallel. I get the impression from gcc/Makefile that the check > > concerned has to be set up in

Re: [RFC] GCC 8 Project proposal: Extensions supporting C Metaprogramming, pseudo-templates

2017-05-11 Thread Marek Polacek
On Thu, May 11, 2017 at 11:12:24AM +0100, Jonathan Wakely wrote: > On 10 May 2017 at 23:14, Daniel Santos wrote: > > Well my primary goal is programming with values that are constant in the > > compiler. There is no language in any C specification (that I'm aware of) > > for a "compile-time consta

Re: Warning annoyances in list_read.c

2017-03-27 Thread Marek Polacek
On Mon, Mar 27, 2017 at 11:16:32AM -0700, Steve Kargl wrote: > On Mon, Mar 27, 2017 at 07:41:12PM +0200, Marek Polacek wrote: > > On Mon, Mar 27, 2017 at 07:33:05PM +0200, Toon Moene wrote: > > > On 03/27/2017 06:45 PM, Marek Polacek wrote: > > > > > > > O

Re: Warning annoyances in list_read.c

2017-03-27 Thread Marek Polacek
On Mon, Mar 27, 2017 at 07:59:01PM +0200, Thomas Koenig wrote: > Am 27.03.2017 um 19:41 schrieb Marek Polacek: > > > Of course "the person" had bootstrapped and tested all the languages before > > adding the warning. If only any of you bothered to check the fortr

Re: Warning annoyances in list_read.c

2017-03-27 Thread Marek Polacek
On Mon, Mar 27, 2017 at 07:33:05PM +0200, Toon Moene wrote: > On 03/27/2017 06:45 PM, Marek Polacek wrote: > > > On Mon, Mar 27, 2017 at 09:27:34AM -0700, Steve Kargl wrote: > > > > But that's okay. I now understand that it is acceptable for > > > a de

Re: Warning annoyances in list_read.c

2017-03-27 Thread Marek Polacek
On Mon, Mar 27, 2017 at 09:27:34AM -0700, Steve Kargl wrote: > On Mon, Mar 27, 2017 at 05:22:12PM +0200, Markus Trippelsdorf wrote: > > On 2017.03.27 at 06:49 -0700, Steve Kargl wrote: > > > > > > Go scan the gcc-patches mailing list for "fallthrough". I'll > > > note other have concerns. Here's

Re: Warning annoyances in list_read.c

2017-03-27 Thread Marek Polacek
On Mon, Mar 27, 2017 at 12:18:17PM +0200, Dominique d'Humières wrote: > > > If he added a new option affecting libgfortran, then he should > > > fix up libgfortran. > > > > He didn't add the warning to specifically annoy fortran developers. > > It is trivial to add seven gcc_fallthrough() or breaks

Re: History of GCC

2016-10-26 Thread Marek Polacek
I think you can learn a lot if you follow the Changes pages, so e.g. , and go back down the history until you reach the ancient . Marek

Re: Problem with 447.dealII in spec2006 because of r240707

2016-10-04 Thread Marek Polacek
On Tue, Oct 04, 2016 at 08:38:00AM -0700, Andrew Pinski wrote: > On Tue, Oct 4, 2016 at 8:33 AM, Bill Seurer wrote: > > parameter_handler.cc: In member function 'double > > ParameterHandler::get_double(const string&) const': > > parameter_handler.cc:777:28: error: ISO C++ forbids comparison betwee

Re: tree-prof parallel make check failures

2016-09-21 Thread Marek Polacek
On Tue, Sep 20, 2016 at 05:29:03PM -0600, Martin Sebor wrote: > I'm seeing a number of failures in different tests in the tree-prof > directory when I run make check in parallel none of which are > reproducible with -j1. I don't see anything about in Bugzilla or > in recent test results. Has anyo

Re: Additional BOFs for the GNU Cauldron?

2016-09-02 Thread Marek Polacek
On Fri, Sep 02, 2016 at 11:19:54AM +0200, Richard Biener wrote: > > There seems to be plenty of slots available on the 2nd track to > schedule additional BOFs. So I'd gather if there is interest > in discussing > > A) Unit testing (GIMPLE FE, RTL FE, the existing unit-testing), > basically

Re: increase alignment of global structs in increase_alignment pass

2016-02-23 Thread Marek Polacek
On Tue, Feb 23, 2016 at 09:49:37PM +0530, Prathamesh Kulkarni wrote: > diff --git a/gcc/tree-vectorizer.c b/gcc/tree-vectorizer.c > index 2b25b45..a6af535 100644 > --- a/gcc/tree-vectorizer.c > +++ b/gcc/tree-vectorizer.c > @@ -794,6 +794,75 @@ make_pass_slp_vectorize (gcc::context *ctxt) >

Re: nonnull, -Wnonnull, and do/while

2016-02-16 Thread Marek Polacek
On Tue, Feb 16, 2016 at 11:11:21AM +0100, Jakub Jelinek wrote: > On Tue, Feb 16, 2016 at 11:04:38AM +0100, Marek Polacek wrote: > > On Tue, Feb 16, 2016 at 10:43:08AM +0100, Stefan Sobernig wrote: > > > Under a recent gcc 6 [*], we run into -Wnonnull warnings using the >

Re: nonnull, -Wnonnull, and do/while

2016-02-16 Thread Marek Polacek
On Tue, Feb 16, 2016 at 10:43:08AM +0100, Stefan Sobernig wrote: > Under a recent gcc 6 [*], we run into -Wnonnull warnings using the > nonnull attribute: Yes, this warning has been enhanced for GCC 6. > test.c: In function 'f': > test.c:16:14: warning: nonnull argument 's' compared to NULL [-Wn

Re: void* vs void *

2016-01-29 Thread Marek Polacek
On Fri, Jan 29, 2016 at 07:13:00PM +0100, Magnus Fromreide wrote: > I just noticed that the C and C++ compiler output pointer types differently: > > Consider > > int i; > printf("%p", &i); > > When compiled as C that gives the warning > > format '%p' expects argument of type 'void *', but argum

Re: Extraneous newline emitted between error messages in GCC 6

2015-12-21 Thread Marek Polacek
On Mon, Dec 21, 2015 at 01:12:33PM -0500, Patrick Palka wrote: > GCC 6, compared to GCC 5, now emits an extra newline between error > messages. Is this intended? > > $ cat error.c > int x = a; > int y = b; > $ gcc-5 error.c > error.c:1:9: error: ‘a’ undeclared here (not in a function) > int x =

Re: How do we write unused arguments?

2015-11-05 Thread Marek Polacek
On Thu, Nov 05, 2015 at 10:32:11AM +0100, Bernd Schmidt wrote: > When reviewing patches I'm never quite sure which of the following we should > be using: > > some_target_hook (tree decl, machine_mode mode ATTRIBUTE_UNUSED) > > some_target_hook (tree decl, machine_mode ARG_UNUSED (mode)) > > some

Re: Identifying Pure and Const Functions

2015-05-29 Thread Marek Polacek
On Fri, May 29, 2015 at 01:16:32PM +0530, Pritam Gharat wrote: > How do we identify whether a function is a pure or a const function? > Is there any flag associated with its cgraph_node or the tree node > (decl of cgraph_node)? You'll want to look into ipa-pure-const.c. Marek

Re: Change to C++11 by default?

2015-05-07 Thread Marek Polacek
On Thu, May 07, 2015 at 01:46:32PM -0500, Jason Merrill wrote: > I think it's time to switch to C++11 as the default C++ dialect for GCC 6. > Any thoughts? Couldn't we switch directly to C++14 now that the support is complete? Regardless, I support changing the default (obviously... ;)).

Re: Unnamed Struct / Union

2015-03-23 Thread Marek Polacek
On Mon, Mar 23, 2015 at 02:07:28PM +0530, Umesh Kalappa wrote: > Hi All , > > GCC 4.8.3 ,pop up with below error > > /home/i16382/an.c:13:18: error: duplicate member 'bOriginator' > unsigned bOriginator; > ^ > > for the case > > union > { > struct > { >

Re: A bug (?) with inline functions at O0: undefined reference

2015-03-06 Thread Marek Polacek
On Fri, Mar 06, 2015 at 07:12:48PM +0300, Ilya Verbin wrote: > Hi All, > > I've discovered a strange behaviour on trunk gcc, here is the reproducer: > > inline int foo () > { > return 0; > } > > int main () > { > return foo (); > } > > $ gcc main.c > /tmp/ccD1LeXo.o: In function `main': > m

Re: array bounds, sanitizer, safe programming, and cilk array notation

2015-02-21 Thread Marek Polacek
Sorry for late reply. On Tue, Jan 27, 2015 at 12:07:58AM +, Joseph Myers wrote: > On Mon, 26 Jan 2015, Martin Uecker wrote: > > > extern void bar2(int (*x)[5]); > > > int c = 4; > > int y[c]; > > > bar2(&y); // not diagnosed (found by asan) > > This is the undefined behav

Re: array bounds, sanitizer, safe programming, and cilk array notation

2015-02-21 Thread Marek Polacek
Sorry for late reply - I've found this in my inbox only today. On Mon, Jan 26, 2015 at 11:53:59AM -0800, Martin Uecker wrote: > > Hi all, > > I am writing numerical code, so I am trying to make the use > of arrays in C (with gcc) suck a bit less. In general, the long term > goal would be to hav

Re: Serious Regressions tables on https://gcc.gnu.org

2015-02-13 Thread Marek Polacek
On Fri, Feb 13, 2015 at 03:12:22PM -0500, Jack Howarth wrote: > Is there a reason why the Serious Regressions tables, displayed by > the links in the 'Release Series and Status' section at > https://gcc.gnu.org, no longer have a column for the priority > (importance) of each bug? We used to hav

Re: Announcing Marek Polacek as C front-end reviewer

2015-01-13 Thread Marek Polacek
On Mon, Jan 12, 2015 at 10:23:16PM -0700, Jeff Law wrote: > I'm pleased to announce that Marek Polacek has been appointed as a reviewer > for the C front-end. Thanks! > Marek, please add yourself as a reviewer for the C front end in the > MAINTAINERS file. 2015-01-

Re: GCC 4.9.2 -O3 gives a seg fault / GCC 4.8.2 -O3 works

2015-01-06 Thread Marek Polacek
On Tue, Jan 06, 2015 at 11:28:52AM -0500, Paul Smith wrote: > On Tue, 2015-01-06 at 09:43 +0100, Jakub Jelinek wrote: > > GCC trunk -fsanitize=undefined (in particular > > -fsanitize=nonnull-attribute) > > diagnoses it: > > /tmp/mystring.cpp:103:26: runtime error: null pointer passed as > > argumen

Re: ICE in 4.8.2 with compound literal

2014-11-25 Thread Marek Polacek
On Tue, Nov 25, 2014 at 10:19:21AM +0100, Mason wrote: > Aaah, you want me to post the bug report to BZ, not here... Yep - the snippet + command-line options you posted was enough to reproduce the bug. The GCC mailing list is not for reporting bugs. > When you have a minute, can you take a look

Re: ICE in 4.8.2 with compound literal

2014-11-25 Thread Marek Polacek
On Tue, Nov 25, 2014 at 09:30:05AM +0100, Mason wrote: > Hello, > > This ICE may have gotten lost in the noise of my own message. > https://gcc.gnu.org/ml/gcc-help/2014-11/msg00094.html > > (The code snippet might be invalid C) > > $ gcc -std=gnu99 -O3 -S test.c > test.c: In function 'main': > t

Re: [RFC] UBSan unsafely uses VRP

2014-11-12 Thread Marek Polacek
On Wed, Nov 12, 2014 at 01:04:58PM +0300, Marat Zakirov wrote: > > On 11/12/2014 11:45 AM, Marek Polacek wrote: > >Yes, but as said above, VRP is only run with >-O2 and -Os. > You meant >= -O2? Yes. Marek

Re: [RFC] UBSan unsafely uses VRP

2014-11-12 Thread Marek Polacek
On Wed, Nov 12, 2014 at 11:42:39AM +0300, Yury Gribov wrote: > On 11/11/2014 05:15 PM, Jakub Jelinek wrote: > >>There are also some unsafe code in functions > >>ubsan_expand_si_overflow_addsub_check, ubsan_expand_si_overflow_mul_check > >>which uses get_range_info to reduce checks number. As seen b

Re: [gimple-classes, committed 4/6] tree-ssa-tail-merge.c: Use gassign

2014-11-08 Thread Marek Polacek
On Fri, Nov 07, 2014 at 10:01:45PM +0100, Richard Biener wrote: > Just a comment as these patches flow by - I think this is a huge step > backwards from "enforcing" s1/s2 being a gimple_assign inside > gimple_assign_rhs1 to this as_a boilerplate at _each_ callsite! FWIW, I feel the same way. Mor

Re: Enabling -fextended-identifiers by default

2014-11-04 Thread Marek Polacek
On Mon, Nov 03, 2014 at 04:24:21PM +, Joseph Myers wrote: > I propose enabling -fextended-identifiers by default for the appropriate > standard versions (i.e. all C++ versions, C99 and above for C - so enabled > by default for C now the default C version is gnu11). Any comments or > objecti

Re: [RFC] Detect most integer overflows.

2014-10-23 Thread Marek Polacek
Hi, On Tue, Apr 22, 2014 at 01:58:00PM +0200, Hannes Frederic Sowa wrote: > I'll play around and will post a new patch in the not too distant > future. ;) Are you still planning on posting the revised patch? Perhaps I could take and finish the patch, but I don't think I can do that because you d

Re: Contributing to GCC

2014-10-17 Thread Marek Polacek
On Fri, Oct 17, 2014 at 09:55:28AM +0200, Krzesimir Nowak wrote: > I was asking, because, in the beginning at least, somebody will have > to commit the patch to trunk for me. I don't know if svn understands > git patches. No worries about that, we'll just apply the patch manually. Marek

Re: Towards GNU11

2014-10-16 Thread Marek Polacek
On Wed, Oct 15, 2014 at 09:28:09PM +0200, Uros Bizjak wrote: > Hello! > > >> The consensus seems to be to go forward with this change. I will > >> commit the patch in 24 hours unless I hear objections. > > > > I made the change. Please report any fallout to me. > > i686-linux-gnu testsuite triv

Re: Towards GNU11

2014-10-15 Thread Marek Polacek
On Wed, Oct 15, 2014 at 11:05:45PM +0200, Jakub Jelinek wrote: > On Wed, Oct 15, 2014 at 09:28:09PM +0200, Uros Bizjak wrote: > > i686-linux-gnu testsuite trivially regressed [1]: Thanks for the log Uros. > I have half of that already in patch form, will test and send either later > tonight or t

Re: Towards GNU11

2014-10-15 Thread Marek Polacek
On Tue, Oct 14, 2014 at 09:23:29AM +0200, Marek Polacek wrote: > The consensus seems to be to go forward with this change. I will > commit the patch in 24 hours unless I hear objections. I made the change. Please report any fallout to me. Enjoy. Marek

Re: Towards GNU11

2014-10-14 Thread Marek Polacek
On Tue, Oct 07, 2014 at 11:07:56PM +0200, Marek Polacek wrote: > I'd like to kick off a discussion about moving the default standard > for C from gnu89 to gnu11. The consensus seems to be to go forward with this change. I will commit the patch in 24 hours unless I hear objectio

Re: Towards GNU11

2014-10-10 Thread Marek Polacek
On Thu, Oct 09, 2014 at 02:34:51PM -0700, Mike Stump wrote: > On Oct 7, 2014, at 2:07 PM, Marek Polacek wrote: > > I'd like to kick off a discussion about moving the default standard > > for C from gnu89 to gnu11. > > I endorse the change of default. Thanks for chimi

Re: Towards GNU11

2014-10-09 Thread Marek Polacek
On Wed, Oct 08, 2014 at 08:39:40PM -0600, Jeff Law wrote: > I like it. And one could reasonably argue that now is the time to change > since that maximizes the time for folks to find broken code. Yep, this is definitely stage1 stuff. We still have a few weeks, but I wouldn't want to rush such a

Re: Towards GNU11

2014-10-08 Thread Marek Polacek
On Wed, Oct 08, 2014 at 09:16:18AM +0200, Richard Biener wrote: > I think it makes sense to do this (and I expect C++ will follow > with defaulting to -std=c++11 once the ABI stuff has settled). Thanks. Moving to -std=c++11 would be cool! > Of course it would be nice to look at the actual fallo

Towards GNU11

2014-10-07 Thread Marek Polacek
rrays do not decay to pointers, slightly different rules for compatible types (?) might come in game as well. In turn, you can use all C99 and C11 features even with -pedantic. Comments? Regtested/bootstrapped on powerpc64-linux and x86_64-linux. 2014-10-07 Marek Polacek * doc/invoke.t

Re: GCC 4.9 internal compiler error

2014-09-29 Thread Marek Polacek
On Mon, Sep 29, 2014 at 11:43:47AM +0400, Игорь Пашев wrote: > Hi all! > > It was found that OA fails to build with GCC 4.9 on amd64 [1] > I can confirm this with r3094 on bare metal too. > > # gcc --version > gcc-4.9.real (Debian 4.9.1-14) 4.9.1 > Copyright (C) 2014 Free Software Foundation, Inc

Re: Turning a single warning into an error in dejagnu test

2014-08-27 Thread Marek Polacek
On Wed, Aug 27, 2014 at 10:59:40AM +0100, Dominik Vogt wrote: > I'm writing a dejagnu test and encounter this warning at one place: > > warning: passing argument 1 of '...' makes integer from pointer > without a cast [enabled by default] > > Now, I have a "{ dg-error ... }" comment in that li

Re: GCC version bikeshedding

2014-08-06 Thread Marek Polacek
On Wed, Aug 06, 2014 at 11:04:14AM +0200, Richard Biener wrote: > On Wed, Aug 6, 2014 at 10:48 AM, Jakub Jelinek wrote: > > - libstdc++ ABI changes (it is a significant user visible change, > > if you rebuild everything, no extra effort is needed, but otherwise > > if you want some C++ code bu

Re: GCC version bikeshedding

2014-08-06 Thread Marek Polacek
On Wed, Aug 06, 2014 at 09:42:23AM +0200, Jakub Jelinek wrote: > On Wed, Aug 06, 2014 at 09:25:48AM +0200, Eric Botcazou wrote: > > > What do you propose that we do? > > > > Probably just jump to 5.0 (or 5.1) without the subsequent acceleration. > > That was my preference too. FWIW, me too. Thi

Re: C as intermediate language, signed integer overflow and -ftrapv

2014-07-24 Thread Marek Polacek
On Wed, Jul 23, 2014 at 04:56:06PM +0200, Thomas Mertes wrote: > A sanitizer such as ubsan is good as tool to find errors in C > programs. But I don't think that ubsan is well suited to do overflow > detection with maximum performance. Is just not the goal of this > tool. That's true. But if you

Re: GCC version bikeshedding

2014-07-22 Thread Marek Polacek
On Sun, Jul 20, 2014 at 07:01:46PM +0200, Jakub Jelinek wrote: > Ian/Jason, is that your understanding too? In any case, we should mention > it on gcc.gnu.org/index.html, in develop.html and perhaps a few other spots. Also it'd be nice to create htdocs/gcc-5.0/changes.html, so we can start adding

Re: Got this one back (too large: 6.4 Mb) from gcc-results:

2014-07-03 Thread Marek Polacek
On Thu, Jul 03, 2014 at 07:06:29PM +0200, Toon Moene wrote: > Compiler version: 4.10.0 20140702 (experimental) (GCC) > Platform: x86_64-unknown-linux-gnu > configure flags: --prefix=/home/toon/compilers/install --with-gnu-as > --with-gnu-ld --with-build-config=bootstrap-ubsan --enable-languages=all

Re: [PATCH] tell gcc optimizer to never introduce new data races

2014-06-10 Thread Marek Polacek
On Tue, Jun 10, 2014 at 04:53:27PM +0200, Peter Zijlstra wrote: > On Tue, Jun 10, 2014 at 03:23:36PM +0200, Jiri Kosina wrote: > > +# Tell gcc to never replace conditional load with a non-conditional one > > +KBUILD_CFLAGS += $(call cc-option,--param allow-store-data-races=0) > > + > > Why do

Re: 4.8.3?

2014-04-03 Thread Marek Polacek
On Thu, Apr 03, 2014 at 04:34:00PM -0300, Daniel Gutson wrote: > is there any plan to release a gcc 4.8.3? Yes. Marek

  1   2   >