Re: [PATCH 0/6] v2 of libdiagnostics

2023-11-23 Thread Pedro Alves
d that the diagnostics stuff doesn't depend on much of GCC's data structures, and doesn't rely on the garbage collector. Is there something preventing that? (Other than "it's-a-matter-of-time/effort", of course.) Pedro Alves

Re: [PATCH 1/2] Add gcc/make-unique.h

2022-07-12 Thread Pedro Alves
On 2022-07-12 7:50 p.m., Jonathan Wakely wrote: > Yeah, and I don't think optimizing for indentation is the right trade off. > Putting something in a namespace with a three-letter name just so you don't > have to re-indent some statements in a few years seems odd. > > I see no technical

Re: [PATCH 1/2] Add gcc/make-unique.h

2022-07-12 Thread Pedro Alves
On 2022-07-12 7:36 p.m., David Malcolm wrote: > On Tue, 2022-07-12 at 17:40 +0100, Pedro Alves wrote: >>> >> >> If that's the approach, then GCC should import std::unique_ptr, >> std::move, >> std::foo, std::bar into the gcc namespace too, no?  A

Re: [PATCH 1/2] Add gcc/make-unique.h

2022-07-12 Thread Pedro Alves
On 2022-07-12 7:36 p.m., Pedro Alves wrote: > On 2022-07-12 7:22 p.m., Jonathan Wakely wrote: >> >> >> On Tue, 12 Jul 2022, 17:40 Pedro Alves, > <mailto:pe...@palves.net>> wrote: >> >> On 2022-07-12 4:14 p.m., Jonathan Wakely wrote: >> >&g

Re: [PATCH 1/2] Add gcc/make-unique.h

2022-07-12 Thread Pedro Alves
On 2022-07-12 7:22 p.m., Jonathan Wakely wrote: > > > On Tue, 12 Jul 2022, 17:40 Pedro Alves, <mailto:pe...@palves.net>> wrote: > > On 2022-07-12 4:14 p.m., Jonathan Wakely wrote: > > >>  So once GCC requires C++14, why would you want to prese

Re: [PATCH 1/2] Add gcc/make-unique.h

2022-07-12 Thread Pedro Alves
On 2022-07-12 4:14 p.m., Jonathan Wakely wrote: >> So once GCC requires C++14, why would you want to preserve >> once-backported symbols in a namespace other than std, when you no longer >> have a reason to? >> It will just be another unnecessary thing that newcomers at that future time >>

Re: [PATCH 1/2] Add gcc/make-unique.h

2022-07-12 Thread Pedro Alves
On 2022-07-12 2:45 p.m., Jonathan Wakely wrote: > On Tue, 12 Jul 2022 at 14:24, Pedro Alves wrote: >> >> On 2022-07-12 1:25 a.m., David Malcolm via Gcc-patches wrote: >> >>> I tried adding it to gcc/system.h, but anything that uses it needs to >>> hav

Re: [PATCH 1/2] Add gcc/make-unique.h

2022-07-12 Thread Pedro Alves
On 2022-07-12 1:25 a.m., David Malcolm via Gcc-patches wrote: > I tried adding it to gcc/system.h, but anything that uses it needs to > have std::unique_ptr declared, which meant forcibly including > from gcc/system.h Did you consider making gcc/system.h include gcc/make-unique.h itself if

Re: [PATCH] c: Implement new -Wenum-int-mismatch warning [PR105131]

2022-05-18 Thread Pedro Alves
smatches may cause portability issues. In C++, such mismatches > +are an error. In C, this warning is enabled by @option{-Wall}. Should it also be enabled by -Wc++-compat? Pedro Alves

Re: [PATCH] Remove conditional STATIC_ASSERT.

2022-05-05 Thread Pedro Alves
On 2022-05-05 13:41, Martin Liška wrote: > On 5/5/22 14:29, Richard Biener wrote: >> Can we then use static_assert (...) instead and remove the >> macro? > > Oh yes, we can ;) > >> Do we have C compiled code left (I think we might, >> otherwise we'd not have __cplusplus guards in system.h), >>

Re: [RFC] Add support for the "retain" attribute utilizing SHF_GNU_RETAIN

2020-10-26 Thread Pedro Alves via Gcc-patches
that just shifts the "inconsistent" behavior elsewhere. Pedro Alves

Re: [RFC] Add support for the "retain" attribute utilizing SHF_GNU_RETAIN

2020-10-26 Thread Pedro Alves via Gcc-patches
associated declaration in its own, unique section, as in option (2). > To me, if I use attribute((used)), and the linker still garbage collects the symbol, then the toolchain has a bug. Is there any use case that would suggest otherwise? Thanks, Pedro Alves

Re: [PATCH] configure: Re-disable building cross-gdbserver

2020-02-12 Thread Pedro Alves
haviour. We have no way to support non-native `gdbserver', and native `gdbserver' is usually of no use with cross-GDB of the chosen host. gdbserver/ChangeLog: 2020-02-12 Maciej W. Rozycki Pedro Alves Skip building gdbserver in a cross-configuration. * configure.srv: Se

Re: Move -Wmaybe-uninitialized to -Wextra

2019-12-17 Thread Pedro Alves
e considered completely disabling -Wmaybe-uninitialized in GDB instead of downgrading it from -Werror to a warning with -Wno-error. [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80635 -- Pedro Alves

Re: Type representation in CTF and DWARF

2019-10-18 Thread Pedro Alves
tion would be possible, preserving type distinction. But since CTF doesn't include these, this is moot for now. Thanks, Pedro Alves

Re: Type representation in CTF and DWARF

2019-10-18 Thread Pedro Alves
p emitting those things? > > In most cases local types etc are a fairly small contributor to the > total volume -- but macros can contribute a lot in some codebases. (The > Linux kernel's READ_ONCE macro is one I've personally been bitten by in > the past, with a new local struct in every use. GCC doesn't deduplicate > any of those so the resulting bloat from tens of thousands of instances > of this identical structure is quite incredible...) > Sounds like something that would be beneficial to do with DWARF too. Thanks, Pedro Alves

Re: Type representation in CTF and DWARF

2019-10-18 Thread Pedro Alves
he linker. I usually see compression ratios of > roughly 3 or 4 to 1: e.g. I just tried it with a randomly chosen binary, > /usr/lib/libgtk-3.so.0.2404.3, and got these sizes: DWARF can be compressed too, with --compress-debug-sections. Thanks, Pedro Alves

Re: Type representation in CTF and DWARF

2019-10-08 Thread Pedro Alves
ote: the Cauldron page is missing slides for your presentation, so I couldn't go and recheck some things mentioned above.) Thanks, Pedro Alves

Re: [PATCH 0/3] add support for POD struct convention (PR 61339)

2019-08-14 Thread Pedro Alves
rther. FWIW and FYI, this is what GDB does (gdb/warning.m4). Thanks, Pedro Alves

Re: [PATCH] Teach mklog to reference PRs.

2019-08-12 Thread Pedro Alves
On 8/12/19 8:34 PM, Pedro Alves wrote: > Let me share my 2c -- the format GDB uses doesn't affect most GCC forks I meant most GCC folks. Thanks, Pedro Alves

Re: [PATCH] Teach mklog to reference PRs.

2019-08-12 Thread Pedro Alves
* configure: Regenerate. * NEWS: Mention awesome feature. gdb/testsuite/ChangeLog: 2013-12-12 John Doe PR gdb/9999 * Makefile: Test changes for awesome feature. " Pedro Alves

Re: Move -Wmaybe-uninitialized to -Wextra

2019-02-20 Thread Pedro Alves
ention it because it's one of the > ways I know packages are building with -Wall -Werror :-) Thanks, Pedro Alves

Re: [PATCH] Set DEMANGLE_RECURSION_LIMIT to 1536

2018-12-11 Thread Pedro Alves
On 12/11/2018 02:25 PM, Ian Lance Taylor wrote: > On Tue, Dec 11, 2018 at 3:05 AM Pedro Alves wrote: >> Ian earlier mentioned that we've wanted to avoid malloc because some >> programs call the demangler from a signal handler, but it seems like >> we already do, these fun

Re: [PATCH] Set DEMANGLE_RECURSION_LIMIT to 1536

2018-12-11 Thread Pedro Alves
ssible to reuse a growing buffer across demangling invocations. > therefore on some targets alloca (or VLAs) are the only > option, and for small sizes even if mmap is available using it is too > costly. > > Though, I like Jason's suggestion of just adding a maxinum of the number > of components and number of substitutions and failing if we need more. > > Jakub Thanks, Pedro Alves

Re: [PATCH] Set DEMANGLE_RECURSION_LIMIT to 1536

2018-12-11 Thread Pedro Alves
0257.html> and Tromey's response. > and alloca can be abused > in all kinds of interesting ways. Thanks, Pedro Alves

Re: RFC: libiberty PATCH to disable demangling of ancient mangling schemes

2018-12-07 Thread Pedro Alves
ained, because it was needed to build some legacy stuff. That was maybe over 8 years ago, and it was off trunk. It's probably dead by now. And if isn't dead, whoever maintains the compiler off trunk certainly can also maintain old-ish binutils & gdb off trunk. Thanks, Pedro Alves

Re: RFA/RFC: Add stack recursion limit to libiberty's demangler [v5]

2018-12-04 Thread Pedro Alves
ut forgot. > >> Also, noticed a typo here: >> >>> +/* If DMGL_NO_RECURE_LIMIT is not enabled, then this is the value used as >> >> Typo: "RECURE" > > Oops - thanks. > > OK, revised (v5) patch attached. Is this version acceptable to all ? > This is fine with me. Thanks, Pedro Alves

Re: RFA/RFC: Add stack recursion limit to libiberty's demangler [v4]

2018-12-04 Thread Pedro Alves
nabled, then this is the value used as Typo: "RECURE" > + the maximum depth of recursion allowed. It should be enough for any > + real-world mangled name. */ > +#define DEMANGLE_RECURSION_LIMIT 1024 > + Thanks, Pedro Alves

Re: RFA/RFC: Add stack recursion limit to libiberty's demangler [v3]

2018-11-30 Thread Pedro Alves
ached. */ > + return 0; > +} > + > + recursion_level ++; > + There's still a static recursion level counter here? Thanks, Pedro Alves

Re: RFA/RFC: Add stack recursion limit to libiberty's demangler

2018-11-30 Thread Pedro Alves
t, possibly only ever done once in an executable's runtime, > so I doubt that there will ever be any real-life thread safety > problems associated with it. But I do understand that this is just > an assumption, not a guarantee. See above. Thanks, Pedro Alves

Re: RFA/RFC: Add stack recursion limit to libiberty's demangler

2018-11-29 Thread Pedro Alves
ork toward that direction harder. (Keeping in mind that if this recursion detection feature is useful for binutils, then it should also be useful for GDB.) Thanks, Pedro Alves

Re: Compilation error in simple-object-elf.c

2018-07-19 Thread Pedro Alves
t;>> ./simple-object-elf.c:1284:14: note: each undeclared identifier is >>> reported only once for each function it appears in >>> >>> Suggested fix: >> >> Works for me, thus OK. I'm going to check it in to make 8.2. > > Thanks. > > Joel/Pedro, is this okay for GDB's copy of libiberty, master and > branch? Yes. Thanks, Pedro Alves

Re: [PATCH][RFC] Make iterating over hash-map elide copying/destructing

2018-07-11 Thread Pedro Alves
the compiler in c++11 its deleted and may > not be used. The macro already exists --- DISABLE_COPY_AND_ASSIGN in include/ansidecl.h. Thanks, Pedro Alves

Re: [PATCH (for gdb)] enum-flags.h: Add trailing semicolon to example in comment

2018-06-05 Thread Pedro Alves
[adding gdb-patches] On 06/05/2018 06:56 PM, David Malcolm wrote: > On Tue, 2018-06-05 at 17:13 +0100, Pedro Alves wrote: >> On 06/05/2018 03:49 PM, David Malcolm wrote: >>> On Tue, 2018-06-05 at 04:40 -0400, Trevor Saunders wrote: >>>> You may want to look at gd

Re: Sharing gdb's enum-flags.h with gcc? (was Re: [PATCH 01/10] Convert dump and optgroup flags to enums)

2018-06-05 Thread Pedro Alves
ader between GCC and GDB; > CCing Pedro; Pedro: hi! Does this sound sane? > (for reference, the GCC patch we're discussing here is: > https://gcc.gnu.org/ml/gcc-patches/2018-05/msg01685.html ) Sure! Thanks, Pedro Alves

Re: ATTRIBUTE_NONSTRING

2018-04-30 Thread Pedro Alves
On 04/27/2018 02:41 AM, Alan Modra wrote: > This patch adds ATTRIBUTE_NONSTRING, which will be used to curb > -Wstringop-truncation warnings in binutils. OK to apply? > > * ansidecl.h (ATTRIBUTE_NONSTRING): Define. +1, FWIW. Thanks, Pedro Alves

Re: [PATCH] Add ax_pthread.m4 for use in binutils-gdb

2018-04-18 Thread Pedro Alves
On 04/17/2018 11:10 PM, Joshua Watt wrote: > On Tue, 2018-04-17 at 22:50 +0100, Pedro Alves wrote: >> On 04/17/2018 06:24 PM, Joshua Watt wrote: >>> Ping? I'd really like to get this in binutils, which apparently >>> requires getting it here first. >> >> I th

Re: [PATCH] Add ax_pthread.m4 for use in binutils-gdb

2018-04-17 Thread Pedro Alves
On 04/17/2018 06:24 PM, Joshua Watt wrote: > Ping? I'd really like to get this in binutils, which apparently > requires getting it here first. I think it would help if you mentioned what this is and what is the intended use case. Was this discussed on the binutils or gdb lists? Thanks,

Re: [documentation patch] add detail to const and pure attributes

2018-04-03 Thread Pedro Alves
On 04/02/2018 11:34 PM, Martin Sebor wrote: > On 04/02/2018 12:09 AM, Sandra Loosemore wrote: >> On 03/27/2018 03:21 PM, Pedro Alves wrote: >>> On 03/27/2018 09:19 PM, Martin Sebor wrote: >>>> On 03/27/2018 01:38 PM, Pedro Alves wrote: >>>>&g

Re: [documentation patch] add detail to const and pure attributes

2018-03-27 Thread Pedro Alves
On 03/27/2018 09:19 PM, Martin Sebor wrote: > On 03/27/2018 01:38 PM, Pedro Alves wrote: >> On 03/27/2018 07:18 PM, Martin Sebor wrote: >>> +Because a @code{pure} function can have no side-effects it does not >> >> FWIW, I'd suggest rephrasing as: >> >>  

Re: [documentation patch] add detail to const and pure attributes

2018-03-27 Thread Pedro Alves
ve no side effects", which gave me pause when I read it the first time, and is the opposite of what you mean. Thanks, Pedro Alves

Re: [PATCH] adjust warning_n() to take uhwi (PR 84207)

2018-02-14 Thread Pedro Alves
On 02/14/2018 09:47 PM, Manuel López-Ibáñez wrote: > On 14 Feb 2018 8:16 pm, "Pedro Alves" <pal...@redhat.com > <mailto:pal...@redhat.com>> wrote: > > Instead of a class that has to have a constructor for every type > you want to pass as plura

Re: [PATCH] adjust warning_n() to take uhwi (PR 84207)

2018-02-14 Thread Pedro Alves
;, "%wu things", i); This is similar in spirit to std::to_string, etc. BTW, the "plural_form" naming above comes from ngettext's documentation of the N parameter: char * ngettext (const char *msgid1, const char *msgid2, unsigned long int n); "The parameter n is used to determine the plural form." Pedro Alves

Re: [C++ PATCH] Plural forms for count != eltscnt structured binding diagnostics

2017-11-30 Thread Pedro Alves
to make it self-describing? Something around: /* Comment/url here. */ unsigned long plural_form_for (unsigned HOST_WIDE_INT val) { return (val > ULONG_MAX ? (val % 100) + 100 : val); } and then: inform_n (loc, plural_form_for (eltscnt), "while %qT decomposes into %wu element", "while %qT decomposes into %wu elements", type, eltscnt); Pedro Alves

Re: [PING] Plugin support on Windows/MinGW

2017-11-23 Thread Pedro Alves
ill help open GCC to many more use cases. The fact that plugins don't work on Windows has been a sore spot, IMO. I for one am very happy that this make gdb's libcc1 plugin a viable option for Windows. Puts us one step closer to the long term plan of making GDB always use GCC for C/C++ expression parsing/evaluation. Yay. :-) Thanks, Pedro Alves

Re: [RFA][PATCH] patch 5/n Cleaning up evrp

2017-11-17 Thread Pedro Alves
an use include/ansidecl.h's DISABLE_COPY_AND_ASSIGN for this [1], and then you don't need the comment, as it's self-documenting. [1] - https://marc.info/?l=gcc-patches=150549025810729=2 (gcc.gnu.org seems to be unreachable for me today.) Thanks, Pedro Alves

Re: [patch] backwards threader cleanups

2017-11-15 Thread Pedro Alves
f-assign from this->speed_p? should the "speed_p" param >> be renamed, e.g. to "speed_p_") > > Yes. Fixed. The convention also says: "When structs and/or classes have member functions, prefer to name data members with a leading m_". So in this case, the preference would be to rename this->speed_p to m_speed_p instead. Thanks, Pedro Alves

Re: [006/nnn] poly_int: tree constants

2017-10-30 Thread Pedro Alves
e_integer.cons] constexpr wide_integer() noexcept = default; Effects: A Constructs an object with undefined value. ~~~ Thanks, Pedro Alves

Re: [RFA][PATCH] Provide a class interface into substitute_and_fold.

2017-10-30 Thread Pedro Alves
is: make the base class destructor protected. Thanks, Pedro Alves

Re: [09/nn] Add a fixed_size_mode_pod class

2017-10-27 Thread Pedro Alves
that, #2 - whether there's an easy to install package providing a new-enough compiler. and it turns out that that was true for all. Meanwhile another year has passed and there have been no complaints. Thanks, Pedro Alves

Re: [006/nnn] poly_int: tree constants

2017-10-26 Thread Pedro Alves
t the bug. In the case above, I'd much prefer if the compiler tells me I missed initializing 't' than initializing it to 0 "just in case". Thanks, Pedro Alves

Re: [006/nnn] poly_int: tree constants

2017-10-26 Thread Pedro Alves
, while T() value-initializes T::i, i.e., initializes it to zero. So if that's a concern, maybe you could use "= default" conditionally depending on #if __cplusplus >= C++11, so that you'd get it for stages after stage1. Or just start requiring C++11 already. :-) Thanks, Pedro Alves

Re: [PATCH] Add INCLUDE_UNIQUE_PTR and use it (PR bootstrap/82610)

2017-10-23 Thread Pedro Alves
On 10/23/2017 07:15 PM, David Malcolm wrote: > OK for trunk? FAOD, FWIW, LGTM. Thanks, Pedro Alves

Re: [PATCH] Include from system.h (PR bootstrap/82610)

2017-10-23 Thread Pedro Alves
abort() calls, I don't recall people-sneaking-in-abort-()-calls ever being a problem over there. Thanks, Pedro Alves

Re: [PATCH] Include from system.h (PR bootstrap/82610)

2017-10-23 Thread Pedro Alves
header dependencies in gcc/system.h and the corresponding '#define INCLUDE_FOO' contortions. There's nothing that you can reasonably do with a reference to a poisoned symbol in a system header, other than avoid having the system header have the '#pragma poison' in effect when its included, which leads to contortions like system.h's. Note that the poisoned names are _still used anyway_. So can we come up with a GCC change that would avoid having to worry about manually doing this? It'd likely help other projects too.) Thanks, Pedro Alves

Re: [PATCH] Include from system.h (PR bootstrap/82610)

2017-10-23 Thread Pedro Alves
's where std::unique_ptr is defined: #if __cplusplus >= 201103 /* In C++11 mode, all we need is import the standard std::unique_ptr. */ template using unique_ptr = std::unique_ptr; > Ok to unbreak bootstrap. Thanks, Pedro Alves

Re: [PATCH] Make -gcolumn-info the default

2017-10-23 Thread Pedro Alves
he good time >> to do it for GCC8. >> >> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? > > Makes sense to me. +1 from me, FWIW. Thanks, Pedro Alves

Re: [patch] implement generic debug() functions for wide_int's

2017-10-18 Thread Pedro Alves
m Jon had: * include/bits/stl_map.h (map::insert(value_type&&)) (map::insert(const_iterator, value_type&&)): Add overload for rvalues. I.e., simply use the full prototype as function name, since it's really what it is in C++. Thanks, Pedro Alves

Re: [PATCH] Implement unique_xmalloc_ptr<T[]> and add more selftests

2017-10-16 Thread Pedro Alves
ested stage1 on powerpc-ibm-aix7.1.3.0 ("gcc111" in the > compile farm; gcc 4.8 i.e. gnu++03) > > Is this OK? Looks great to me. > +/* Verify that gnu::unique_malloc_ptr works. */ Typo: malloc -> xmalloc. Appears in other comments too. Thanks, Pedro Alves

Re: [PATCH] Add gnu::unique_ptr

2017-10-13 Thread Pedro Alves
es gdb::unique_xmalloc_ptr though. Might make sense to switch to using gnu::unique_xmalloc_ptr instead. GDB does have an xfree function that we call instead of free throughout (that's where the reference David fixed comes from). We can most probably just switch to free too nowadays. Also, gdb nowadays also has a gdb::unique_xmalloc_ptr<T[]> specialization that this patch is missing (because the specialization was added after switching to C++11): [pushed] Allow gdb::unique_xmalloc_ptr<T[]> https://sourceware.org/ml/gdb-patches/2017-08/msg00212.html So we'd need that before switching. I don't recall off hand whether it's easy to make that work with the C++03 version. Thanks, Pedro Alves

Re: [PATCH] Add a warning for invalid function casts

2017-10-12 Thread Pedro Alves
gine that it'd be much objectionable, and having a standard type may help tooling give better diagnostics and suggestions. Thanks, Pedro Alves

Re: [PATCH] Add a warning for invalid function casts

2017-10-12 Thread Pedro Alves
l end up with: void foo (const char *s = "..."); typedef void F (...); F *pf = (F *)foo; pf (); which still compiles silently and calls the foo function incorrectly. Thanks, Pedro Alves

Re: [PATCH] Add a warning for invalid function casts

2017-10-12 Thread Pedro Alves
nt, int); typedef void (type_erased_func) (); // note: void dropped type_erased_func *func = (type_erased_func *) foo; int main () { func (1, 2); // whoops, now silently compiles } I think it'd be good if this were weighed in as well. If 'void ()' is picked as the special type, then maybe the above could be at least addressed in the documentation, and/or diagnostics/notes. Thanks, Pedro Alves

Re: correct attribute ifunc C++ type safety (PR 82301)

2017-09-28 Thread Pedro Alves
as builtin. Then it'd work on C++03 as well, and the compiler of course can precisely validate whether the cast is valid. (It's quite possible that there's a better check than is_polymorphic as I've written above.) Just a passing thought. Thanks, Pedro Alves

Re: [demangler] Fix nested generic lambda

2017-09-15 Thread Pedro Alves
On 09/15/2017 05:15 PM, Pedro Alves wrote: > On 09/15/2017 01:04 PM, Nathan Sidwell wrote: >> >> >> Pedro, would you like me to port to gdb's libiberty, or will you do a >> merge in the near future? > > I wasn't planning to, but I'm doing it now. > Now

Re: [demangler] Fix nested generic lambda

2017-09-15 Thread Pedro Alves
On 09/15/2017 01:04 PM, Nathan Sidwell wrote: > > > Pedro, would you like me to port to gdb's libiberty, or will you do a > merge in the near future? I wasn't planning to, but I'm doing it now. Thanks much for the fix! -- Pedro Alves

[pushed] Fix compile time error when using ansidecl.h with an old version of GCC.

2017-09-15 Thread Pedro Alves
pushing the patch to gcc as is. Thanks, Pedro Alves >From 47ba729a29c6fa2283835d95d2ab5695d8c5d732 Mon Sep 17 00:00:00 2001 From: Nick Clifton <ni...@redhat.com> Date: Mon, 31 Jul 2017 15:08:32 +0100 Subject: [PATCH] Fix compile time error when using ansidecl.h with an old versi

Re: [PATCH] Add -std=c++2a

2017-09-15 Thread Pedro Alves
On 09/15/2017 01:53 PM, Jakub Jelinek wrote: > On Mon, Aug 07, 2017 at 02:17:17PM +0100, Pedro Alves wrote: >> I happened to skim this patch and notice a couple issues. >> See below. > > Note I've just posted updated patch based on this to gcc-patches. Thanks ( FWIW :-) ).

Re: [C++ PATCH] Renames/adjustments of 1z to 17

2017-09-14 Thread Pedro Alves
eprecated. > @end table I think you meant to say that gnu++1z is deprecated, not gnu++17. Thanks, Pedro Alves

Re: [Ping^2][PATCH, DWARF] Add DW_CFA_AARCH64_negate_ra_state to dwarf2.def/h and dwarfnames.c

2017-09-05 Thread Pedro Alves
DW_CFA_DUP. >>> * dwarf2.h (DW_CFA_DUP): New define. >>> >>> libiberty/ >>> * dwarfnames.c (DW_CFA_DUP): New define. >>> I'd like to add a +1 vote for this patch. I was confused more than once in the iterations of the pending gdb patch that were adding references to "DW_CFA_GNU_window_save" in Aarch64 code that has absolutely nothing to do with SPARC register windows, and asked Jiong whether we could add an Aarch64-specific name for the constant. Thanks, Pedro Alves

Re: [PATCH 0/2] add unique_ptr class

2017-09-05 Thread Pedro Alves
On 09/05/2017 05:52 PM, Manuel López-Ibáñez wrote: > On 05/08/17 20:05, Pedro Alves wrote: >> That'd be an "obvious" choice, and I'm not terribly against it, >> though I wonder whether it'd be taking over a name that has a wider >> scope than intended? I.e., GNU i

Re: [PATCH 0/2] add unique_ptr class

2017-09-04 Thread Pedro Alves
On 09/04/2017 11:31 AM, Richard Biener wrote: > On Fri, Aug 11, 2017 at 10:43 PM, Jonathan Wakely <jwak...@redhat.com> wrote: >> On 05/08/17 20:05 +0100, Pedro Alves wrote: >>> >>> On 08/04/2017 07:52 PM, Jonathan Wakely wrote: >>>> >>>>

Re: [libcc1] Improve detection of triplet on compiler names

2017-08-23 Thread Pedro Alves
plet_libcc1_happened_to_be_built_with" + "-gcc" because we end up with: "$gdb_specified_triplet_re" + "-" "$whatever_triplet_libcc1_happened_to_be_built_with" + "-gcc" which is the problem case. In sum, I think the libcc1.so (not the plugin) should _not_ have baked in target awareness, and thus C_COMPILER_NAME should always be "gcc", and then libcc1's regex should be adjusted to also tolerate a suffix in the final compiler binary name regex. WDYT? Thanks, Pedro Alves

Re: [libcc1] Improve detection of triplet on compiler names

2017-08-23 Thread Pedro Alves
On 08/23/2017 02:07 PM, Sergio Durigan Junior wrote: > On Wednesday, August 23 2017, Pedro Alves wrote: > >> On 08/23/2017 05:17 AM, Sergio Durigan Junior wrote: >>> The GCC patch improves the libcc1::compiler_triplet_regexp::find and >>> libcp1::compiler_triplet

Re: [libcc1] Improve detection of triplet on compiler names

2017-08-23 Thread Pedro Alves
presence of the triplet > string in the compiler name. I am sorry about the cross-post, but these > patches are really dependent on one another. Is there a backward/forward compatibility impact? Does new GDB work with old GCC? Does old GDB work with new GCC? Thanks, Pedro Alves

Re: [PATCH] Add macro DISABLE_COPY_AND_ASSIGN

2017-08-11 Thread Pedro Alves
t;>> think it is better to put this macro in include/ansidecl.h so that >>> other projects can use it too. >>> >>> Boostrapped on x86_64-linux-gnu. Is it OK? >>> >>> include: >>> >>> 2017-07-19 Yao Qi <yao...@linaro.org> >

Re: [PATCH 6/6] qsort comparator consistency checking

2017-08-07 Thread Pedro Alves
it can't work with vec. Since std::sort is a template, the inlining + indirection avoidance often results in faster sorts (potentially at the expense of compile time). Consistency checking could be implemented by adding a a gcc::sort wrapper around std::sort (and calling the former throughout). Thanks, Pedro Alves

Re: [PATCH] Add -std=c++2a

2017-08-07 Thread Pedro Alves
ng) == CLK_GNUCXX1Z) > _cpp_define_builtin (pfile, "__cplusplus 201703L"); >else if (CPP_OPTION (pfile, lang) == CLK_CXX14 > Thanks, Pedro Alves

Re: [PATCH 0/2] add unique_ptr class

2017-08-05 Thread Pedro Alves
h I wonder whether it'd be taking over a name that has a wider scope than intended? I.e., GNU is a larger set of projects than the GNU toolchain. For example, there's Gnulib, which already compiles as libgnu.a / -lgnu, which might be confusing. GCC doesn't currently use Gnulib, but GDB does, and, there was work going on a while ago to make GCC use gnulib as well. Thanks, Pedro Alves

Re: [PATCH] Remove Pascal language in source code.

2017-07-13 Thread Pedro Alves
ware.org/gdb/onlinedocs/stabs.html https://www.sourceware.org/gdb/onlinedocs/stabs.html#Source-Files Thanks, Pedro Alves

Re: [PATCH] Finish implementing P0426R1 "Constexpr for std::char_traits" for C++17

2017-06-12 Thread Pedro Alves
irst. OK. BTW, for extra thoroughness, to confirm we're handling both const & non-const arrays correctly, I had written this testsuite tweak too. Would you like to have this in? >From 3f7adab8bab68955aafd760467bb860057140d40 Mon Sep 17 00:00:00 2001 From: Pedro Alves <pal...@redhat.com> Dat

Re: [RFC] Dejagnu patch to handle multi-line directives

2017-06-12 Thread Pedro Alves
ot;-DSTACK_SIZE=[dg-effective-target-value stack_size]" \ { target { stack_size } } } */ Might be less magical and simpler to implement too. Thanks, Pedro Alves

Re: C/C++ PATCH to implement -Wmultiline-expansion (PR c/80116)

2017-06-08 Thread Pedro Alves
On 06/08/2017 12:19 PM, Marek Polacek wrote: > On Thu, Jun 08, 2017 at 12:01:03PM +0100, Pedro Alves wrote: >> On 06/08/2017 11:29 AM, Marek Polacek wrote: >>> On Wed, Jun 07, 2017 at 08:02:42PM +0100, Pedro Alves wrote: >>>> Hi Marek, >>>> >>>>

Re: C/C++ PATCH to implement -Wmultiline-expansion (PR c/80116)

2017-06-08 Thread Pedro Alves
On 06/08/2017 11:29 AM, Marek Polacek wrote: > On Wed, Jun 07, 2017 at 08:02:42PM +0100, Pedro Alves wrote: >> Hi Marek, >> >> Nice warning! Just to confirm, would the patch warn with code like: > > Thanks. BTW, if you (or anyone) could come up with a better na

Re: C/C++ PATCH to implement -Wmultiline-expansion (PR c/80116)

2017-06-07 Thread Pedro Alves
); default: return ""; } #undef CASE }; ? I think it shouldn't, but I couldn't tell from the tests, and the only similar instance I found in gcc is guarded behind an #ifdef (in eh_data_format_name). Thanks, Pedro Alves

Re: MinGW compilation warnings in libiberty's include/environ.h

2017-05-22 Thread Pedro Alves
On 05/20/2017 02:27 AM, DJ Delorie wrote: > > Pedro Alves <pal...@redhat.com> writes: >> That sounds to me like the root issue that should be fixed, >> so that these fallback definitions don't come into into play at all. >> I.e., why isn't HAVE_ENVIRON_DECL def

Re: MinGW compilation warnings in libiberty's xstrndup.c

2017-05-22 Thread Pedro Alves
On 05/20/2017 01:38 AM, DJ Delorie wrote: > > Pedro Alves <pal...@redhat.com> writes: >> Ah, yeah. AFAICS, all the declaration checks in libiberty.h are >> HAVE_DECL checks. This suggests to me that this declaration guard >> should be HAVE_DECL too [1]. > >

Re: MinGW compilation warnings in libiberty's xstrndup.c

2017-05-19 Thread Pedro Alves
ried adjusting gcc, but even if it wouldn't work there, it'd still be a net win. Wonder what others think of that approach. Thanks, Pedro Alves

Re: MinGW compilation warnings in libiberty's xstrndup.c

2017-05-19 Thread Pedro Alves
configure defines HAVE_DECL_STRNLEN. Header guards need > to be coordinated across all the users, not just libiberty. > The "user" in this case is libiberty itself. Thanks, Pedro Alves

Re: MinGW compilation warnings in libiberty's xstrndup.c

2017-05-19 Thread Pedro Alves
On 05/19/2017 04:40 PM, Eli Zaretskii wrote: >> Cc: gdb-patc...@sourceware.org, Thomas Schwinge <tho...@codesourcery.com> >> From: Pedro Alves <pal...@redhat.com> >> Date: Fri, 19 May 2017 16:22:55 +0100 >> >> But then, xstrndup.c has at the top: >&g

Re: MinGW compilation warnings in libiberty's include/environ.h

2017-05-19 Thread Pedro Alves
t is if it weren't? That sounds to me like the root issue that should be fixed, so that these fallback definitions don't come into into play at all. I.e., why isn't HAVE_ENVIRON_DECL defined on mingw when setenv.o is built? Sounds like a decl check is missing in configure.ac. Thanks, Pedro Alves

Re: MinGW compilation warnings in libiberty's waitpid.c

2017-05-19 Thread Pedro Alves
remove the waitpid replacement instead. Thanks, Pedro Alves

Re: MinGW compilation warnings in libiberty's xstrndup.c

2017-05-19 Thread Pedro Alves
he top: #ifdef HAVE_STRING_H #include #else # ifdef HAVE_STRINGS_H # include # endif #endif So I would expect your build to pick the strnlen declaration from one of the string.h or strings.h mingw headers. Why didn't it? Thanks, Pedro Alves

Re: [PATCH] warn on mem calls modifying objects of non-trivial types (PR 80560)

2017-05-17 Thread Pedro Alves
say "value-initializing it" instead. > + T (bzero, (p, sizeof *p));// { dg-warning "bzero" } > + T (memset, (p, 0, sizeof *p));// { dg-warning "memset" } > + T (memset, (p, i, sizeof *p));// { dg-warning "memset" } Thanks, Pedro Alves

Re: [PATCH] warn on mem calls modifying objects of non-trivial types (PR 80560)

2017-05-17 Thread Pedro Alves
On 05/17/2017 02:55 AM, Martin Sebor wrote: > On 05/16/2017 04:48 PM, Pedro Alves wrote: >> On 05/16/2017 08:41 PM, Jason Merrill wrote: >> >>> I agree that it makes sense to >>> check for a trivial assignment operator specifically. I guess we want >>&g

Re: [PATCH] warn on mem calls modifying objects of non-trivial types (PR 80560)

2017-05-16 Thread Pedro Alves
trivial" in the standard C++ sense. The documentation talks about "The safe way", and "does not warn on safe calls", so maybe call it -Wunsafe-memaccess? (I spotted a couple typos in the new patch: "otherwse", "becase", btw.) Thanks, Pedro Alves

Re: [1/2] PR 78736: New warning -Wenum-conversion

2017-05-09 Thread Pedro Alves
starting to think > that rather than adding yet another option to GCC it might be better > to extend your -Wenum-conversion once it's committed to cover those > cases (and also to avoid issuing multiple warnings for essentially > the same problem). Let me ponder that some more. Thanks, Pedro Alves

Re: [PATCH] warn on mem calls modifying objects of non-trivial types (PR 80560)

2017-04-30 Thread Pedro Alves
nd up like that, given char's magic properties, but still I think many will reach for "void" first if they (really really) need to add a cast to silence the warning. In any case, I think it'd be very nice to add cases with such casts to the new tests, and maybe mention it in the documentation too. Thanks, Pedro Alves

Re: [PATCH 3/8] Simplify representation of locations of a block.

2017-04-28 Thread Pedro Alves
On 04/28/2017 08:01 PM, Pedro Alves wrote: > On 04/28/2017 05:28 PM, Martin Sebor wrote: >> On 04/28/2017 05:47 AM, Nathan Sidwell wrote: > >>>> @@ -427,9 +429,31 @@ static void output_lines (FILE *, const source_t >>>> *); >>>> static cha

Re: [PATCH 3/8] Simplify representation of locations of a block.

2017-04-28 Thread Pedro Alves
time: https://sourceware.org/ml/gdb-patches/2017-04/msg00378.html https://sourceware.org/ml/gdb-patches/2017-04/msg00381.html Thanks, Pedro Alves

  1   2   3   >