[libcpp] fix some line map comments

2018-08-30 Thread Nathan Sidwell
A couple of cleanups for comments. committing to trunk. nathan -- Nathan Sidwell 2018-08-30 Nathan Sidwell * include/line-map.h (enum lc_reason): Comment each member separately. (struct line_maps): Fix reallocator comment. Index: include/line-map.h

Re: [PR c++/87137] GCC-8 Fix

2018-08-30 Thread Nathan Sidwell
e -- besides it might be nice to be able to remove the template-specific CLASSTYPE_DECL_LIST which almost but not quite mirrors TYPE_FIELDS. Ok for trunk, ok for 8? nathan -- Nathan Sidwell 2018-08-30 Nathan Sidwell PR c++/87137 * stor-layout.c (place_field): Scan forward

[PR c++/87137] GCC-8 Fix

2018-08-29 Thread Nathan Sidwell
7 and patched gcc-8 for an x86_64-mingw32 target. Liu Hao has verified that the microsoft compiler gives the same results. I also attach a change to wwwdocs describing this change. Thoughts? nathan -- Nathan Sidwell 2018-08-29 Nathan Sidwell PR c++/87137 gcc/ * stor-layout.c (pla

[C++ PATCH] Remove K&R declaration hack.

2018-08-29 Thread Nathan Sidwell
h on powerpc8-aix with no change in test results. (Thanks David on helping with that.) IMHO we don't need to warn about this going way first. If it did affect a target it'd be very noisy. I'll commit in a few days, unless there are objections. nathan -- Nathan Sidwell 2018

Re: [C++ Patch] Pr 85265 ("[concepts] ICE with missing identifier")

2018-08-29 Thread Nathan Sidwell
that currently nargs is never zero: due to the above slightly broken logic the vector has always at least an element (possibly with DECL_NAME == error_mark_node). Tested x86-64-linux. ok -- Nathan Sidwell

Re: [C++ PATCH] Fix structured binding range for in generic lambda inside of template (PR c++/87122)

2018-08-29 Thread Nathan Sidwell
ok thanks -- Nathan Sidwell

Re: [C++ Patch] PR 86546 (" ICE on invalid: tree_class_check_failed()")

2018-08-28 Thread Nathan Sidwell
CE. Tested x86_64-linux. ok -- Nathan Sidwell

[libiberty patch] Fix PGO bootstrap

2018-08-22 Thread Nathan Sidwell
me a local variable to avoid shadowing a parameter. ok? nathan -- Nathan Sidwell 2018-08-22 Nathan Sidwell Martin Liska * pex-unix.c (pex_unix_exec_child): Duplicate bad_fn into local scopes to avoid potential clobber. Index:

[libiberty patch] Fix PGO bootstrap

2018-08-22 Thread Nathan Sidwell
me a local variable to avoid shadowing a parameter. ok? nathan -- Nathan Sidwell 2018-08-22 Nathan Sidwell Martin Liska * pex-unix.c (pex_unix_exec_child): Duplicate bad_fn into local scopes to avoid potential clobber. Index:

Re: [libiberty patch] pex-unix error behaviour

2018-08-21 Thread Nathan Sidwell
On 08/21/2018 03:04 PM, Ian Lance Taylor wrote: On Tue, Aug 21, 2018 at 11:15 AM, Nathan Sidwell wrote: OK, but what about a system that does int vfork() { return fork(); } ? Isn't such a system just buggy? Hm, apparently not. Because of the requirement the user just calls

Re: [libiberty patch] pex-unix error behaviour

2018-08-21 Thread Nathan Sidwell
On 08/21/2018 12:37 PM, Ian Lance Taylor wrote: On Tue, Aug 21, 2018 at 8:03 AM, Nathan Sidwell wrote: 1) If we know we're using vfork, we can tell the parent directly via the current stack frame and suitable use of volatiles. I'm pretty reluctant to rely on this special behavio

[libiberty patch] pex-unix error behaviour

2018-08-21 Thread Nathan Sidwell
on altered separately, let me know. booted and tested on x86_64-linux. I manually tested both the fork and vfork configurations with a non-existent child executable as shown above. ok? nathan -- Nathan Sidwell 2018-08-21 Nathan Sidwell * pex-unix.c (VFORK_STRING): Replace this string w

Re: [libiberty patch] PEX-unix forking

2018-08-20 Thread Nathan Sidwell
n != STDIN_FILE_NO) { if (close(in) < 0) bad_fn = "close"; } This is OK with those changes. Fair enough, committing the attached. I've elided the unnecessary braces, as there are no trailing elses in this case. nathan -- Nathan Sidwell 2018-08

[PATCH] fix some build breakage

2018-08-20 Thread Nathan Sidwell
Jeff alerted me to some build breakage on s390 and spu targets. He's confirmed this patch unbreaks s390, so I expect spu is also good. Committing to trunk. Sorry for not deploying grep earlier. nathan. -- Nathan Sidwell 2018-08-20 Nathan Sidwell Jeff Law * config/s390/s

[CPP PATCH] node field bits

2018-08-20 Thread Nathan Sidwell
Last bit of cleanup in the preprocessor. We only need 2 bits to hold the node_type enumeration, and 8 bits for the flags. That leaves several unused bits, which we may as well note. nathan -- Nathan Sidwell 2018-08-20 Nathan Sidwell * include/cpplib.h: Fixup some whitespace

[libiberty patch] PEX-unix forking

2018-08-20 Thread Nathan Sidwell
booted on x86_64-linux (which uses vfork), ok? nathan -- Nathan Sidwell 2018-08-20 Nathan Sidwell * pex-unix.c (pex_child_error): Delete. (pex_unix_exec_child): Commonize error paths to single message & exit. Index: pex-unix.c =

[CPP PATCH] node type

2018-08-20 Thread Nathan Sidwell
booted and tested on x86_64-linux. applying to trunk. nathan -- Nathan Sidwell 2018-08-20 Nathan Sidwell * include/cpplib.h (NODE_BUILTIN, NODE_MACRO_ARG): Delete. Renumber others. (enum node_type): Replace NT_MACRO with NT_USER_MACRO, NT_BUILTIN_MACRO, NT_MACRO_ARG. Delete NT_ASSERTION.

[CPP PATCH] Fix warning & other cleanups.

2018-08-20 Thread Nathan Sidwell
I noticed I'd inadvertently allowed a trailing comma to creep in, leading to annoying warnings. I'd also missed a few uses of the cpp_macro_p function and friends. Plus Bernhard had suggested there's a name for 255 when it's encoding unsigned char range. Fixed thusl

[PATCH] Kill cpp-id-data.h

2018-08-20 Thread Nathan Sidwell
mmitting to trunk. nathan -- Nathan Sidwell 2018-08-20 Nathan Sidwell libcpp/ * Makefile.in (TAGS_SOURCES): Remove cpp-id-data.h. * include/cpp-id-data.h: Delete. * internal.h: Include cpplib.h not cpp-id-data.h. gcc/ * Makefile.in (CPP_ID_DATA_H): Delete. (CPP_INTERNAL_H): Don&

[PATCH] #assert becomes macro-like

2018-08-20 Thread Nathan Sidwell
later. The remaining changes are mechanical (the answer struct already used the trailing array hack for the tokens, so drops straight into the update cpp_macro representation). booted & tested on x86_64-linux, committing to trunk. nathan -- Nathan Sidwell 2018-08-20 Nathan Sidwell l

[PATCH] Adjust lazy macro definition

2018-08-17 Thread Nathan Sidwell
nery is all GTY marked. This does mean we'll lazily define the PCH'd macro upon every first use after reading back, but that doesn't seem costly to me. booted & tested on x86_64-linux. nathan -- Nathan Sidwell 2018-08-17 Nathan Sidwell libcpp/ * include/cpplib

[PATCH] Macro body is trailing array

2018-08-17 Thread Nathan Sidwell
ded constifying, as we now inherit the qualification of the containing cpp_macro object when looking at its tokens. booted & tested on x86_64-linux. nathan -- Nathan Sidwell 2018-08-17 Nathan Sidwell libcpp/ * include/cpplib.h (enum cpp_macro_kind): New. (struct cpp_macro): Make body t

[PATCH] Move cpp_macro to cpplib.h

2018-08-17 Thread Nathan Sidwell
;ll be morphing the cpp_macro definition, but thought it better to move then morph, than vice-versa. booted & tested on x86_64-linux nathan -- Nathan Sidwell 2018-08-17 Nathan Sidwell libcpp/ * cpp-id-data.h (uchar, UC): Move to internal.h (struct cpp_macro): Move to cpplib.h. * in

[PATCH] Macro definition parameter parsing

2018-08-16 Thread Nathan Sidwell
more consistent error messages -- hence the changes to the two testcases. booted & tested on x86_64-linux. nathan -- Nathan Sidwell 2018-08-16 Nathan Sidwell libcpp/ * internal.h (_cpp_save_parameter): Take parmno, not macro. (_cpp_unsave_parameters): Declare. * macro.c (_cpp_save_paramet

[PATCH] CPP Macro predicates

2018-08-15 Thread Nathan Sidwell
vector keyword extension. I'll commit in a day or so, as the non-preprocessor changes are obvious. nathan -- Nathan Sidwell 2018-08-15 Nathan Sidwell libcpp/ * include/cpplib.h (cpp_user_macro_p, cpp_builtin_macro_p) (cpp_macro_p): New inlines. * directives.c (do_pragma_poiso

Re: [C++ Patch] Tweak check_previous_goto_1 to emit hard errors instead of permerrors in some cases

2018-08-14 Thread Nathan Sidwell
chlet below passes testing on x86_64-linux. Thanks, Paolo. / ok, thanks -- Nathan Sidwell

Re: [PATCH] line-map include-from representation

2018-08-08 Thread Nathan Sidwell
. Ah, that shows how to use dg-regexp, which does the trick. I guess I can go kill the hack I did on the modules branch for this. Here's what I'll commit nathan -- Nathan Sidwell Index: gcc/ChangeLog === --- gcc

Re: [PATCH] line-map include-from representation

2018-08-08 Thread Nathan Sidwell
s all unconditionally pruned before the output scanners get a look-see. On the modules branch I ended up hacking in a pre-pruned-output hook. It's not pretty. nathan -- Nathan Sidwell

[PATCH] line-map include-from representation

2018-08-08 Thread Nathan Sidwell
dexes to the library users. [I noticed that a piece of this patch already escaped, we were using LAST_SOURCE_COLUMN in diagnostic_report_current_module, but I'd inadvertently changed that in the prepatch that was intended to prepare the ground for this one. Sorry.] booted & tested

Re: [PATCH] Line map table allocation

2018-08-07 Thread Nathan Sidwell
On 08/07/2018 03:43 PM, David Malcolm wrote: OK for trunk, with the nits noted above fixed. Committing this, thanks nathan -- Nathan Sidwell 2018-08-07 Nathan Sidwell * line-map.c: (linemap_init): Set default allocator here. (new_linemap): Rather than here. Refactor allocation logic

[PATCH] Line map table allocation

2018-08-06 Thread Nathan Sidwell
r (xmalloc) in the init routine, rather than check it for each allocation. I doubt the loss of a devirtualization possibility is significant (we're doing allocation wrong if it is). booted & tested on x86_64-linux ok? nathan -- Nathan Sidwell 2018-08-06 Nathan Sidwell * line-m

Re: C++ PATCH to fix infinite constexpr evaluation (PR c++/86767)

2018-08-06 Thread Nathan Sidwell
. I like the use of 'continue' in the processing of 'continue' :) nathan -- Nathan Sidwell

[PATCH] Diagnostic included-from loop

2018-08-06 Thread Nathan Sidwell
s (imported at). Having single logic to figure that out is simpler. In the near future, I have a patch to change the representation of the included-from information, which I'll get to shortly. ok? nathan -- Nathan Sidwell 2018-08-06 Nathan Sidwell * diagnostic.c (diagnostic_

Re: [C++ PATCH] Fix ICE in build_base_path (PR c++/86706)

2018-08-03 Thread Nathan Sidwell
c++/86706 * class.c (build_base_path): Use currently_open_class. * g++.dg/template/pr86706.C: New test. Ok nathan -- Nathan Sidwell

Re: [PATCH][C++] Fix PR86763, wrong-code with TYPE_TYPELESS_STORAGE

2018-08-02 Thread Nathan Sidwell
6_64-unknown-linux-gnu, OK? Thanks, Richard. 2018-08-02 Richard Biener PR c++/86763 * class.c (layout_class_type): Copy TYPE_TYPELESS_STORAGE to the CLASSTYPE_AS_BASE. * g++.dg/torture/pr86763.C: New testcase. Ok, thanks. -- Nathan Sidwell

Re: [PATCH,nvptx] Truncate config/nvptx/oacc-parallel.c

2018-08-01 Thread Nathan Sidwell
ngs not to fail miserably. This is a *.a library, can't you I think it should fail horribly. If it succeeded, the performance would suck. Far better to shout at the user sooner. nathan -- Nathan Sidwell

Re: [PATCH] Add malloc predictor (PR middle-end/83023).

2018-08-01 Thread Nathan Sidwell
it gets is that the non-placement forms might be implemented via malloc and friends. nathan -- Nathan Sidwell

Re: [PATCH] Handle overlength strings in C++ FE

2018-08-01 Thread Nathan Sidwell
reg-tested on x86_64-pc-linux-gnu. Is it OK for trunk? ok. -- Nathan Sidwell

Re: [PATCH] Fix an UBSAN error in cp/parse.c (PR c++/86653).

2018-07-27 Thread Nathan Sidwell
On 07/26/2018 04:52 AM, Martin Liška wrote: Hello. Quite simple patch that initializes a boolean value before it's used. The variable is not initialized when an error recovery happens. Ready for trunk after testing? ok, thanks nathan -- Nathan Sidwell

Re: [PATCH 01/11] Add __builtin_speculation_safe_value

2018-07-27 Thread Nathan Sidwell
elp! added to todo list. nathan -- Nathan Sidwell

Re: [PATCH 01/11] Add __builtin_speculation_safe_value

2018-07-27 Thread Nathan Sidwell
e_overloaded_builtin already works correctly with template instantiations, but a templatatized testcase would be nice -- shout if you'd like help constructing one. nathan -- Nathan Sidwell

Re: [C++ PATCH] Further get_identifier ("string literal") C++ FE caching

2018-07-25 Thread Nathan Sidwell
On 07/18/2018 06:43 PM, Jakub Jelinek wrote: On Wed, Jul 18, 2018 at 06:00:20PM -0400, Nathan Sidwell wrote: So cool! Thanks. Ok for both patches or just this one? both are ok, sorry for delay (vacation), thanks for doing that! nathan -- Nathan Sidwell

Re: [C++ PATCH] Further get_identifier ("string literal") C++ FE caching

2018-07-18 Thread Nathan Sidwell
So cool! Thanks. Sorry for the top posting nathan-- Nathan Sidwell Original message From: Jakub Jelinek Date: 7/18/18 17:04 (GMT-05:00) To: Nathan Sidwell Cc: Jason Merrill , gcc-patches@gcc.gnu.org Subject: [C++ PATCH] Further get_identifier ("string literal&quo

Re: [PATCH][C++] Fix PR86523

2018-07-17 Thread Nathan Sidwell
-hook invocation because of that. So the easy fix is to flush out globals before starting the init function. looks sensible, ok. nathan -- Nathan Sidwell

Re: [C++ Patch] Check permerror return value

2018-07-16 Thread Nathan Sidwell
On 07/16/2018 07:46 AM, Paolo Carlini wrote: Hi, over the last weeks, while working on various diagnostic issues, I noticed a few defective permerror + inform pairs. Tested x86_64-linux. ok, thanks -- Nathan Sidwell

Re: C++ patch ping

2018-07-13 Thread Nathan Sidwell
On 07/13/2018 09:49 AM, Jakub Jelinek wrote: - PR c++/3698, PR c++/86208 extern_decl_map & TREE_USED fix (plus 2 untested variants) http://gcc.gnu.org/ml/gcc-patches/2018-07/msg00084.html ok, thanks -- Nathan Sidwell

Re: C++ patch ping

2018-07-13 Thread Nathan Sidwell
How hard would it be to add the 6 special identifiers to the C++ global table via initialize_predefined_identifiers (decl.c) and then use them directly in the for range machinery? repeated get_identifier ("string-const") just smells bad. nathan -- Nathan Sidwell

[PR c++/86374] Name lookup failure in enclosing template

2018-07-13 Thread Nathan Sidwell
es the code in tsubst_aggr_class itself, when it's tsubsting the context of the class it is dealing with. A small drive-by cleanup in the parser. Committing to trunk now. will commit to gcc-8 after testing there. nathan -- Nathan Sidwell 2018-07-13 Nathan Sidwell PR c++/86374 * pt.c (loo

Re: Invert sense of NO_IMPLICIT_EXTERN_C

2018-07-03 Thread Nathan Sidwell
could a global reviewer comment? This touches a lot of target-specific config files. David has kindly checked AIX is ok, the known target needing the functionality. https://gcc.gnu.org/ml/gcc-patches/2018-06/msg01568.html nathan On 06/25/2018 12:48 PM, Nathan Sidwell wrote

Re: [C++ PATCH] Hide __for_{range,begin,end} symbols (PR c++/85515)

2018-07-03 Thread Nathan Sidwell
lookup and generally it is ok that they have user accessible names. Just the range for vars are a special case. Yeah, I'd rather not have DECL_ARTIFICIAL be significant in name lookup. An unspellable name would be better, which is what we do for, eg, ctors. nathan -- Nathan Sidwell

Re: [line-map patch] Better packing of maps

2018-06-26 Thread Nathan Sidwell
ases available to me aren't gcc-trunk ready (I don't know if they contain single TUs so large). nathan -- Nathan Sidwell

[line-map patch] Better packing of maps

2018-06-26 Thread Nathan Sidwell
dding. On a 64-bit target the ordinary map goes from 32 to 24 bytes. booted & tested on x86_64-linux. I'll commit in a few days, unless there are objections (it is part of libcpp, but has an explicit maintainer listed). nathan -- Nathan Sidwell 2018-06-26 Nathan Sidwell Reorg

Invert sense of NO_IMPLICIT_EXTERN_C

2018-06-25 Thread Nathan Sidwell
spin and report. Blessing from a GM after a few days out there would be nice :) The lesson here is that when one has a transition, chose an enablement mechanism that makes it easy to tell when the transition is complete. nathan -- Nathan Sidwell 2018-06-25 Nathan Sidwe

Re: [PATCH, PR86257, i386/debug] Fix insn prefix in tls_global_dynamic_64_

2018-06-25 Thread Nathan Sidwell
tion size to be specified explicitly, overriding the normal encoding rules. (ARM needs to distinguish data from insns to emit the mapping symbols needed for be8 endianness xforms). nathan -- Nathan Sidwell

Re: [PR c++/85634] Fix tsubst ICE

2018-06-20 Thread Nathan Sidwell
On 06/20/2018 10:33 AM, Nathan Sidwell wrote: This patch fixes 85634, an ice during tsubst where we encounter an unmarked lookup.  Such lookups could be mutated by declarations added after the template definition containing them.   That would be bad. This patch is needed on trunk, to handle

Re: [PR c++/85634] Fix tsubst ICE

2018-06-20 Thread Nathan Sidwell
And here's the patch for gcc-8. nathan -- Nathan Sidwell 2018-06-20 Nathan Sidwell PR c++/85634 - tsubst ICE on unmarked lookup * parser.c (cp_parser_primary_expression): Keep lookup in template. PR c++/85634 - tsubst ICE on unmarked lookup * g++.dg/lookup/pr85634.C: New. Index: g

[PR c++/85634] Fix tsubst ICE

2018-06-20 Thread Nathan Sidwell
hich my earlier attempts at fixing broke the concept machinery. So not as simple as one might hope. The new maybe_fn_decls call is probably useable in a bunch of other places that call 'is_overloaded_fn get_fns' I'll port a cut down variant of this to the gcc-8 branch. na

Re: [PATCH] RISC-V: Add interrupt attribute support.

2018-05-29 Thread Nathan Sidwell
On 05/25/2018 06:30 PM, Jim Wilson wrote: -/* Return true if func is a naked function. */ +/* Return true if funcion TYPE is an interrupt function. */ .^^^ +static bool +riscv_interrupt_type_p (tree type) funcion? -- Nathan Sidwell

Re: [PATCH] libgcov: report about a different timestamp (PR gcov-profile/85759).

2018-05-29 Thread Nathan Sidwell
or message in libgcov. Moreover, to be really sure we don't break a profile, users should use GCOV_EXIT_AT_ERROR. Tested on gcov.exp on x86_64-linux-gnu. Ready to install after proper bootstrap? ok, thanks -- Nathan Sidwell

Re: [C++ PATCH] Pedwarn on a non-standard position of a C++ attribute.

2018-05-24 Thread Nathan Sidwell
(cp_parser_namespace_definition): Pedwarn about attributes after the namespace name. testsuite/ Pedwarn on a non-standard position of a C++ attribute. * g++.dg/cpp1z/namespace-attribs2.C: New. ok, thanks nathan -- Nathan Sidwell

Re: Aliasing 'this' in a C++ constructor

2018-05-18 Thread Nathan Sidwell
ly or indirectly, from the constructor’s this pointer, the value of the object or subobject thus obtained is unspecified." nathan -- Nathan Sidwell

Re: Aliasing 'this' in a C++ constructor

2018-05-18 Thread Nathan Sidwell
to that effect. Ok then, thanks for the explanations. nathan -- Nathan Sidwell

Re: Aliasing 'this' in a C++ constructor

2018-05-18 Thread Nathan Sidwell
risons to this? I thought restrict implied such a comparison was 'never the same'? ie. if the ctor was: selfie (selfie *ptr) : me (ptr==this ? 0 : ptr) {} nathan -- Nathan Sidwell

Re: [PATCH] gcov: add new option -t that prints output to stdout (PR gcov-profile/84846).

2018-05-18 Thread Nathan Sidwell
a FILE* to the outputting routines? That would be nicer, but if not practical, this is ok. nathan -- Nathan Sidwell

Re: [PATCH] Print working directory to gcov files (PR gcov-profile/84846).

2018-05-18 Thread Nathan Sidwell
On 05/18/2018 08:42 AM, Martin Liška wrote: V2: pwd is renamed to cwd, which is a better name. Martin ok thanks. nathan -- Nathan Sidwell

Re: Aliasing 'this' in a C++ constructor

2018-05-18 Thread Nathan Sidwell
think the following bizarre code is nevertheless well-formed: struct selfie { selfie *me; selfie (selfie *ptr) : me (ptr) {} }; selfie bob (&bob); nathan -- Nathan Sidwell

Re: [Patch / RFC] Rename POINTER_TYPE_P to INDIRECT_TYPE_P ?

2018-05-14 Thread Nathan Sidwell
<-> REFERENCE_TYPE conversions are useless, so the distinction is lost during optimizations really soon. The middle ends don't know that in C++ REFERENCE_TYPE is never a null pointer (IIUC). It might be nice if they knew that. nathan -- Nathan Sidwell

[C++ PATCH] Kill -fno-for-scope

2018-05-07 Thread Nathan Sidwell
As prophesied by gcc 8.1, I have nuked the ARM-era for-scope compatibilty of -fno-for-scope. It has been a c++98-only feature, and that's not the default anymore. Time for this to go. nathan -- Nathan Sidwell 2018-05-07 Nathan Sidwell gcc/cp/ Remove fno-for-scope * cp-t

[C++ Patch] Kill -ffriend-injection

2018-05-03 Thread Nathan Sidwell
As prophesied in GCC 8.1, it's time to kill friend injection. Committing to trunk. nathan -- Nathan Sidwell 2018-05-03 Nathan Sidwell * doc/extend.texi (Deprecated Features): Remove -ffriend-injection. (Backwards Compatibility): Likewise. * doc/invoke.texi (C++ Language Op

Re: [PATCH] Add fix-it hint for missing return statement in assignment operators (PR c++/85523)

2018-05-01 Thread Nathan Sidwell
ype's a base of the current object. *) convert_to_base would also allow dropping the REFERENCE_TYPE check here, so icky code returning by-value could also be caught. Up to you. But otherwise ok. nathan -- Nathan Sidwell

Re: [patch] allow '-' for stdout dump

2018-04-30 Thread Nathan Sidwell
On 04/28/2018 11:33 AM, Sandra Loosemore wrote: On 04/27/2018 07:12 AM, Nathan Sidwell wrote: Hmmm, I'd like to wordsmith this a bit and clean up the markup, etc. How about this? looks good, this is what I'm committing, thanks! nathan -- Nathan Sidwell 2018-04-30 Nath

[C++ PATCH] cleanup 2

2018-04-27 Thread Nathan Sidwell
When working on the recent ptrmem static_cast bug, I noticed convert_ptrmem could do with a bit of modernization. Thusly moved its local var decls to their assignments. nathan -- Nathan Sidwell 2018-04-27 Nathan Sidwell * typeck.c (convert_ptrmem): Move local var decls to initialization

Re: [patch] allow '-' for stdout dump

2018-04-27 Thread Nathan Sidwell
s. I tried rationalizing the developer options into different subsections, but that quickly turned into a rat hole. Here I've just pulled out the filename creation to an earlier paragraph. WDYT? nathan -- Nathan Sidwell 2018-04-27 Nathan Sidwell * dumpfile.c (dump_open): Allow 

[C++ PATCH] some cleanups

2018-04-27 Thread Nathan Sidwell
ade a template (now?) internal creator function extern committing to trunk. nathan -- Nathan Sidwell 2018-04-27 Nathan Sidwell * cp-tree.h (TEMPLATE_INFO): Fix comments. (TI_PENDING_TEMPLATE_FLAG): Check TEMPLATE_INFO. (NON_DEFAULT_TEMPLATE_ARG_COUNT): Wrap line. (dump, print_other_binding_s

[patch] allow '-' for stdout dump

2018-04-26 Thread Nathan Sidwell
Here's the patch to allow '-' as a synonym for 'stdout'. It's easier to type, and a convention used elsewhere. Also document the existing stdout/stderr selection along with the new behaviour? ok for trunk? nathan -- Nathan Sidwell 2018-04-26 Nathan Sidwe

dumpfile cleanup

2018-04-26 Thread Nathan Sidwell
ng whether to fclose. It seems more straight forwards to just compare to stdin & stdout themselves. This patch does that cleanup, and the next patch will add the '-' functionality. I've been using this on the modules branch for some time now. ok for trunk? nathan -- Na

Re: [PATCH] Don't offer suggestions for compiler-generated variables (PR c++/85515)

2018-04-25 Thread Nathan Sidwell
at the end, so the user cannot name them. We could move the space to the beginning, if that helps? $21 = $23 = These two could also have the space treatment. $22 = This is a perfectly serviceable user available function, just as any member operator function. nathan -- Nathan Sidwell

Re: [PATCH] [PR c++/85437] accept static_casted ptrmem in constexpr

2018-04-24 Thread Nathan Sidwell
Now with added patchy goodness. On 04/24/2018 12:31 PM, Nathan Sidwell wrote: On 04/23/2018 01:19 PM, Jason Merrill wrote: On Fri, Apr 20, 2018, 12:52 PM Nathan Sidwell     I have to change convert_ptrmem to always     expand the constant (into an OFFSET_TYPE) so that

Re: [PATCH] [PR c++/85437] accept static_casted ptrmem in constexpr

2018-04-24 Thread Nathan Sidwell
On 04/23/2018 01:19 PM, Jason Merrill wrote: On Fri, Apr 20, 2018, 12:52 PM Nathan Sidwell I have to change convert_ptrmem to always expand the constant (into an OFFSET_TYPE) so that initializer_constant_valid_p (used by reduced_constant_expression_p) doesn't get confused

Re: [PATCH] [PR c++/85437] accept static_casted ptrmem in constexpr

2018-04-20 Thread Nathan Sidwell
vel without turning the optimizer on. IMHO we only need to check this is happening at some point when the optimizer is turned on. (The original bug was wrong code, but then perhaps it should be a runtime check?) WDYT? nathan -- Nathan Sidwell 2018-04-20 Nathan Sidwell PR c++/85437 PR

Re: [PATCH] [PR c++/85437] accept static_casted ptrmem in constexpr

2018-04-20 Thread Nathan Sidwell
s only zero for conversions through the primary base (or suitably placed empty base). CONVERT_EXPR would seem more natural there? nathan -- Nathan Sidwell

Re: [C++ PATCH] empty-declarations

2018-04-10 Thread Nathan Sidwell
On 04/10/2018 12:43 PM, Jason Merrill wrote: On Tue, Apr 10, 2018 at 12:32 PM, Nathan Sidwell wrote: On 04/10/2018 12:00 PM, Jason Merrill wrote: I don't see why we should warn at all. It's not on by default, but some people want to get a warning about redundant semicolons.

Re: [C++ PATCH] empty-declarations

2018-04-10 Thread Nathan Sidwell
On 04/10/2018 12:00 PM, Jason Merrill wrote: On Tue, Apr 10, 2018 at 11:06 AM, Nathan Sidwell wrote: This is the -Wextra-semi warning that Volker added recently, and your patch would break. Do we want -Wextra-semi to now warn about all empty declarations at class/namespace scope, not just

[C++ PATCH] empty-declarations

2018-04-10 Thread Nathan Sidwell
after an in-class function definition: class X { void foo () {}; // semi-colon accepted }; And we emitted a fixit for that case. This isn't a regression. I don't think anyone's complained. Jason, WDYT about committing this now? nathan -- Nathan Sidwell 2018-04-10 Natha

Re: [PATCH] [PR c++/85039] no type definitions in builtin offsetof

2018-04-03 Thread Nathan Sidwell
edantic, and it is particularly useful for type punning via an anonymous union. */ || COMPLETE_TYPE_P (b->this_entity But I would think we should reject the definition of d because a is already complete, so it's too late to add members to it. Agreed. -- Nathan Sidwell

Re: [C++ PATCH] Fix invalid covariant return error-recovery (PR c++/85068)

2018-03-27 Thread Nathan Sidwell
-linux, ok for trunk? 2018-03-27 Jakub Jelinek PR c++/85068 * class.c (update_vtable_entry_for_fn): Don't ICE if base_binfo is NULL. Assert if thunk_binfo is NULL then errorcount is non-zero. ok, thanks. nathan -- Nathan Sidwell

Re: [C++ Patch] Fix confusing diagnostics for invalid overrides

2018-03-27 Thread Nathan Sidwell
On 03/27/2018 03:08 AM, Volker Reichelt wrote: On 03/26/2018 01:19 PM, Nathan Sidwell wrote: On 03/25/2018 10:18 AM, Volker Reichelt wrote: How about the following then? I rephrased the last three errors a little to really make them stand-alone errors. Again, bootstrapped and regtested

Re: [C++ Patch] Fix confusing diagnostics for invalid overrides

2018-03-26 Thread Nathan Sidwell
on. Perhaps reword it to something like "overridden function is %qD" I.e. a more stand-alone message than a continuation of the error. nathan -- Nathan Sidwell

Re: Deprecate not defining NO_IMPLICIT_EXTERN_C

2018-03-22 Thread Nathan Sidwell
clearly a post-gcc8 thing. nathan -- Nathan Sidwell

[PR c++/85008] ICE looking for clone

2018-03-21 Thread Nathan Sidwell
This ICE turned out to be a latent bug exposed by moving the member fns onto the FIELDS list. We should be using DECL_CLONED_FUNCTION_P not DECL_CLONED_FUNCTION. Grepping showed another place (doing a similar linkage check) affected too. nathan -- Nathan Sidwell 2018-03-21 Nathan Sidwell

[PR c++/84804] ICE with default arg, template friend & lambda

2018-03-21 Thread Nathan Sidwell
This gets us back to the older behaviour, but at least we push into the instantiation, not the template because of changes I made earlier. nathan -- Nathan Sidwell 2018-03-21 Nathan Sidwell PR c++/84804 * name-lookup.c (do_pushtag): Permit lambdas to be pushed into complete classes.

Re: Deprecate not defining NO_IMPLICIT_EXTERN_C

2018-03-21 Thread Nathan Sidwell
On 03/21/2018 10:18 AM, David Edelsohn wrote: AIX still requires implicit extern C. I previously have tried to disable the feature on AIX and it failed miserably. That's unfortunate :( nathan -- Nathan Sidwell

Re: MAINTAINERS with no port

2018-03-21 Thread Nathan Sidwell
On 03/21/2018 08:02 AM, Richard Biener wrote: On Wed, Mar 21, 2018 at 12:38 PM, Nathan Sidwell wrote: I just had reason to look at the target maintainer list. There seems to be a couple of CPU ports listed in MAINTAINERS that do not exist in the config directory. Ok to remove? (Jeff you&#x

lm32 port?

2018-03-21 Thread Nathan Sidwell
? nathan -- Nathan Sidwell

Deprecate not defining NO_IMPLICIT_EXTERN_C

2018-03-21 Thread Nathan Sidwell
the uses from #ifndef NO_IMPLICIT_EXTERN_C into #if !NO_IMPLICIT_EXTERN_C (That's just as vulnerable to misspellings of the name as the ifndef case, and we're converting existing code, so probably quite safe.) My suspicion is that pdp11 and/or vax may care? Comments/Objections? nathan -- Nathan Sidwell

MAINTAINERS with no port

2018-03-21 Thread Nathan Sidwell
I just had reason to look at the target maintainer list. There seems to be a couple of CPU ports listed in MAINTAINERS that do not exist in the config directory. Ok to remove? (Jeff you're the lucky, 'who do I ask' recipient) nathan -- Nathan Sidwell 2018-03-21

Remove long-dead deprecation documentation

2018-03-21 Thread Nathan Sidwell
Sandra, this removes the now-deleted deprecated features. AFAICT these have been gone for a long time -- 2008 is the most recent changelog entry -- so no need to put it in any release notes. ok? nathan -- Nathan Sidwell 2018-03-21 Nathan Sidwell * doc/extend.texi (Deprecated Features

[PR c++/84836] ICE with local scopes

2018-03-21 Thread Nathan Sidwell
thusly. nathan -- Nathan Sidwell 2018-03-21 Nathan Sidwell PR c++/84836 * name-lookup.c (update_binding): Correct logic for local binding update. PR c++/84836 * g++.dg/lookup/pr84836.C: New. Index: gcc/cp/name-lookup.c === --- gcc/c

Deprecate some C++ extensions

2018-03-20 Thread Nathan Sidwell
on into 'Deprecated Features'. Perhaps add a 'Removed Features' section too? Sandra, WDYT? nathan -- Nathan Sidwell 2018-03-20 Nathan Sidwell * doc/extend.texi (Deprecated Features): Update deprecared flags, mention anon-struct/union members and trailing attributes.

[PR c++/84970] lookup marking

2018-03-20 Thread Nathan Sidwell
nding. When the lookup involved via a using directive we can detect the marking failure. nathan -- Nathan Sidwell 2018-03-20 Nathan Sidwell PR c++/84970 * cp-tree.h (lookup_list_keep): Declare. * tree.c (lookup_list_keep): New, broken out of ... (build_min): ... here. Call it. * d

<    5   6   7   8   9   10   11   12   13   14   >