Re: [PATCH] Install cp/operators.def as part of plugin headers

2017-11-07 Thread Nathan Sidwell
On 11/07/2017 10:31 AM, Boris Kolpackov wrote: 2017-11-07 Boris Kolpackov * Make-lang.in (CP_PLUGIN_HEADERS): Add operators.def since included in cp-tree.h. Applied, thanks. -- Nathan Sidwell

Re: [PATCH 8/N][RFC][v3]: GCOV: support multiple functions per a line

2017-11-08 Thread Nathan Sidwell
On 11/08/2017 06:03 AM, Martin Liška wrote: On 11/07/2017 03:49 PM, Nathan Sidwell wrote: On 11/07/2017 05:53 AM, Martin Liška wrote: Hello. This is slightly updated version from the previous. Various small issues were fixed and I update documentation in order to reflect the changes

Re: [Diagnostic Patch] don't print column zero

2017-11-08 Thread Nathan Sidwell
On 11/02/2017 04:33 PM, Nathan Sidwell wrote: On 10/26/2017 10:34 AM, David Malcolm wrote: [CCing Rainer and Mike for the gcc-dg.exp part] My Tcl skills aren't great, so hopefully someone else can review this; CCing Rainer and Mike. Ping? https://gcc.gnu.org/ml/gcc-patches/20

Re: [PATCH 1/7] GCOV: introduce global vector of functions

2017-11-09 Thread Nathan Sidwell
. (release_structures): Likewise. ok -- Nathan Sidwell

Re: [PATCH 2/7] GCOV: simplify usage of function_info::artificial.

2017-11-09 Thread Nathan Sidwell
} }; +/* Function filter based on function_info::artificial variable. */ + +static bool +is_artificial (function_info *fn) +{ + return fn->artificial; +} couldn't this be a member fn of function_info? -- Nathan Sidwell

Re: [PATCH 3/7] GCOV: introduce vector for function_info::counts.

2017-11-09 Thread Nathan Sidwell
): Likewise. (read_count_file): Likewise. (solve_flow_graph): Likewise. ok -- Nathan Sidwell

Re: [PATCH 4/7] GCOV: remove typedef for function_t

2017-11-09 Thread Nathan Sidwell
): Likewise. (accumulate_line_counts): Likewise. (output_lines): Likewise. ok -- Nathan Sidwell

Re: [PATCH 5/7] GCOV: remove typedef for arc_t

2017-11-09 Thread Nathan Sidwell
. (output_line_details): Likewise. (output_function_details): Likewise. ok -- Nathan Sidwell

Re: [PATCH 7/7] GCOV: remove typedef of coverage_t.

2017-11-09 Thread Nathan Sidwell
): Likewise. (output_intermediate_line): Likewise. (generate_results): Likewise. ok -- Nathan Sidwell

Re: [PATCH 6/7] GCOV: remove typedef for block_t

2017-11-09 Thread Nathan Sidwell
. (output_line_details): Likewise. ok -- Nathan Sidwell

[PATCH] GCOV: create one intermediate file per a gcno file (PR gcov-profile/82702).

2017-11-09 Thread Nathan Sidwell
e_structures (); } } clearer? -- Nathan Sidwell

[PATCH] GCOV: do not support unexecuted blocks in Ada

2017-11-09 Thread Nathan Sidwell
atting and commit. nathan -- Nathan Sidwell

[PATCH] New lang hook

2017-11-14 Thread Nathan Sidwell
t out of the map. Then set the new name. 6) excitingly, mangle_decl can be called with a non-null DECL_ASSEMBLER_NAME, so that function's use of SET_DECL_ASSEMBLER_NAME works just fine. booted on all languages. ok? nathan -- Nathan Sidwell 2017-11-13 Nathan Sidwell PR c++/82836 P

[PR c++/82878] pass-by-invisiref in lambda

2017-11-14 Thread Nathan Sidwell
rms have yet to be bashed into invisrefs. So not thunky enough. This patch restores the deleted cp_genericize_r code and elides the setting of CALL_FROM_THUNK_P during call generation. Jason, does this look right? nathan -- Nathan Sidwell 2017-11-14 Nathan Sidwell PR c++/82878 PR c++/

lambda-switch regression

2017-11-15 Thread Nathan Sidwell
break;// { dg-error "break" } }; <--- warning now here We seem to be diagnosing the last line of the statement, not the first. That seems not a useful. I've not investigated what patch may have caused this, on the chance someone might already know? nathan -- Nathan Sidwell

[PR c++/81574] lambda capture of function reference

2017-11-15 Thread Nathan Sidwell
This patch fixes 81574. Even when the capture default is '=', a reference to a function is captured by reference. The init-capture case captures a pointer, via auto deduction machinery. AFAICT that's the correct behaviour. applying to trunk. nathan -- Nathan Sidwell 201

[PR c++/81060] ICE with invalid initialzer via lambda

2017-11-16 Thread Nathan Sidwell
C::foo (T, function = [] {}); Applying to trunk. nathan -- Nathan Sidwell 2017-11-16 Nathan Sidwell PR c++/81060 * decl.c (xref_tag_1): Push lambda into current scope. * name-lookup.c (do_pushtag): Don't deal with ts_lambda here. PR c++81060 * g++.dg/cpp0x/lambda/lambda-temp

Re: [PATCH] New lang hook

2017-11-16 Thread Nathan Sidwell
it doesn't). Any particular reason? Maybe just document (including to NULL_TREE), thus exclude from NULL_TREE? As discussed on IRC, this variant calls the new hook from the default set_decl_assembler_name hook. Applying. nathan -- Nathan Sidwell 2017-11-16 Nathan Sidwell PR c++/

[PR tree-optimization/83022] malloc/memset->calloc too aggressive

2017-11-17 Thread Nathan Sidwell
ense. If the user's written it the wrong way round, we're in UB territory anyway. The existing tests for this optimization do not regress. The new test shows the optimization being repressed, as expected. ok? nathan -- Nathan Sidwell 2017-11-17 Nathan Sidwell PR tree-optimiz

[PR c++/82836] Fixe testcase

2017-11-17 Thread Nathan Sidwell
The 82836 testcase fell out of creduce. In c++17 mode it fails horribly with missing return errors. Applying this fix, so it's valid in c++17. It still ICEs (in both 14 and 17 modes) with the 82836 fix removed. nathan -- Nathan Sidwell 2017-11-17 Nathan Sidwell * g++.dg/pr82836.C

Re: [PR tree-optimization/83022] malloc/memset->calloc too aggressive

2017-11-17 Thread Nathan Sidwell
B churn getting read-as-zero anonymous pages. And possibly similar churn returning freed pages to the OS. nathan -- Nathan Sidwell

Re: [Diagnostic Patch] don't print column zero

2017-11-20 Thread Nathan Sidwell
On 11/20/2017 05:41 AM, Christophe Lyon wrote: I have just committed (r254949) the attached patch to fix a regression in the arm tests after this was committed (r254691). I hope it's obvious enough. I certainly think so. thanks! nathan -- Nathan Sidwell

Re: [C++ PATCH] Fix constexpr VEC_COND_EXPR handling (PR c++/82781)

2017-11-20 Thread Nathan Sidwell
difference in the comment describing cxx_eval_vector_conditional_expression nathan -- Nathan Sidwell

Re: [PR c++/82836] Fixe testcase

2017-11-20 Thread Nathan Sidwell
s, nathan -- Nathan Sidwell

Re: Patch ping

2017-11-20 Thread Nathan Sidwell
On 11/20/2017 02:55 AM, Jakub Jelinek wrote: Hi! http://gcc.gnu.org/ml/gcc-patches/2017-11/msg01026.html C++2A P0329R4: Designated Initialization OK, thanks -- Nathan Sidwell

Re: Patch ping

2017-11-20 Thread Nathan Sidwell
the only thing missing from the patch itself. Otherwise ok. nathan -- Nathan Sidwell

Re: [C/C++ PATCH] Fix ICE in get_atomic_generic_size (PR c++/83059)

2017-11-20 Thread Nathan Sidwell
NT_CST_LOW (p)) >= MEMMODEL_LAST) + warning_at (loc, OPT_Winvalid_memory_model, + "invalid memory model argument %d of %qE", x + 1, + function); Ok with a comment mentioning memmodel_base only looks at low-order bits. nathan -- Nathan Sidwell

Re: [RFC][PATCH] Extend DCE to remove unnecessary new/delete-pairs

2017-11-22 Thread Nathan Sidwell
ally exclusive flags, DECL_STATIC_{CON,DE}STRUCTOR may be candiates? nathan -- Nathan Sidwell

Re: [RFC][PATCH] Extend DCE to remove unnecessary new/delete-pairs

2017-11-22 Thread Nathan Sidwell
f bit flags (DECL_IS_MALLOC, DECL_IS_OPERATOR_NEW, DECL_CONSTRUCTOR, DECL_STATIC_CONSTRUCTOR, etc) that are mutually exclusive. It would be better to use some kind of enumeration, rather than individual flags. (We've run out of bits). (Suggested by Richard Biener & Nathan Sidwell) [Th

Re: [C++ PATCH] Fix qsort checking ICE on member_name_cmp (PR c++/82401)

2017-11-22 Thread Nathan Sidwell
on x86_64-linux and i686-linux, ok for trunk? ok nathan -- Nathan Sidwell

Re: [C++ PATCH] Optimize void COND_EXPRs during cp_fold (PR c++/81675)

2017-11-27 Thread Nathan Sidwell
have any labels, and not folding it early means bogus warnings afterwards. Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? ok, thanks nathan -- Nathan Sidwell

Re: [C++ PATCH] Avoid -Wreturn-type warnings if a switch has default label, no breaks inside of it, but is followed by a break (PR sanitizer/81275)

2017-11-27 Thread Nathan Sidwell
a default: CASE_LABEL_EXPR. * g++.dg/warn/pr81275.C: New test. ok -- Nathan Sidwell

Re: [C++ PATCH] Avoid -Wreturn-type warnings if a switch has default label, no breaks inside of it, but is followed by a break (PR sanitizer/81275)

2017-11-27 Thread Nathan Sidwell
'm all for setting such a flag during construction. (I presume doing so is essentially free) nathan -- Nathan Sidwell

Re: [C++ PATCH] Avoid -Wreturn-type warnings if a switch has default label, no breaks inside of it, but is followed by a break (PR sanitizer/81275)

2017-11-27 Thread Nathan Sidwell
f this flag are more like SWITCH_STMT_COVERS_ALL_CASES, perhaps something of that ilk would be a clearer name? nathan -- Nathan Sidwell

Re: [C++ PATCH] Avoid -Wreturn-type warnings if a switch has default label, no breaks inside of it, but is followed by a break (PR sanitizer/81275, take 2)

2017-11-28 Thread Nathan Sidwell
/are/ (first one, no trailing 'g' modifier :) + because there is a default: case label or because the case label ranges cover + all values. */ nathan -- Nathan Sidwell

[PATCH] complex type canonicalization

2017-11-28 Thread Nathan Sidwell
k? nathan -- Nathan Sidwell 2017-11-28 Nathan Sidwell PR c++/83817 * tree.c (build_complex_type): Fix canonicalization. Only fill in type if it is new. PR c++/83187 * g++.dg/opt/pr83187.C: New. Index: testsuite/

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

2017-11-30 Thread Nathan Sidwell
0) + 100 : eltscnt, Is such elaboration with the modulo operator necessary? wouldn;t an arbitrary non-unity constant do. (It took me a while to figure out what this was trying to do. At least a comment?) nathan -- Nathan Sidwell

[PR C++/83287] Mark lookup for keeping

2017-12-05 Thread Nathan Sidwell
function call. AFAICT it is the only node of this form. applying to trunk. nathan -- Nathan Sidwell Index: cp/tree.c === --- cp/tree.c (revision 255420) +++ cp/tree.c (working copy) @@ -3230,6 +3230,13 @@ build_min (enum tree_code cod

[PATCH] -fdump-tree, -save-temps=obj & subdirs

2017-12-07 Thread Nathan Sidwell
.218t.veclower 0 x.313t.statistics 4 x.009t.ehopt 4 x.019t.fixup_cfg1 0 x.046t.profile_estimate 4 x.219t.cplxlower0 4 x.ii ok? nathan -- Nathan Sidwell 2017-12-06 Nathan Sidwell * opts.c (finish_options): Don't prefix dump_base_name if it already contains directories. Index: gcc/opts

[PR C++/15272] lookups with ambiguating dependent base

2017-12-12 Thread Nathan Sidwell
tcase, but it erroneously expected the ambiguous message. I punted on adding a warning if the instantiation lookup would find something different. nathan -- Nathan Sidwell 2017-12-12 Nathan Sidwell PR c++/15272 * pt.c (tsubst_baselink): Don't repeat the lookup for non-dependent ba

[PR C++/59930] template friend classes & default args

2017-12-14 Thread Nathan Sidwell
usion. nathan -- Nathan Sidwell 2017-12-14 Nathan Sidwell PR c++/59930 * decl.c (xref_tag_1): Correct comments about template friends and default args. * friend.c (make_friend_class): Move comments concerning self-friendliness to code dealing with such. * pt.c (check_default_tmpl_args): Dea

Re: [PR C++/59930] template friend classes & default args

2017-12-15 Thread Nathan Sidwell
On 12/14/2017 02:31 PM, Nathan Sidwell wrote: PR 59930 concerns some problems with templated friend classes (of templates).  In rying to clean up our handling, I discovered we were accepting default args of such things.  This is ill formed [temp.param]/12 'A default template-argument

[PR c++/59930] template friend injection

2017-12-18 Thread Nathan Sidwell
ermit removal of some checks in other friend cases too. I have not investigated. applying to trunk nathan -- Nathan Sidwell 2017-12-18 Nathan Sidwell PR c++/59930 * name-lookup.c (name_lookup::search_unqualified): Don't search parent namespace when looking for hidden thing

Re: [PATCH] Fix gcov-dump tool for GCDA files (PR gcov-profile/83509).

2017-12-20 Thread Nathan Sidwell
On 12/20/2017 09:43 AM, Martin Liška wrote: Hi. It's quite simple bug, where we read more than allowed in case of GCDA files. Tested on couple of source files. ok -- Nathan Sidwell

[PR c++/83406] deducing lambda type

2017-12-21 Thread Nathan Sidwell
call operator - class_specifier + late_parsing_for_member + function_definition_after_declarator + ctor_initializer_opt_and_function_body */ looks like the kind of development note I'd write to myself. It doesn't match the code (any more?). Jason, have I missed something? natha

[C++ PATCH] tiny code cleanup

2018-01-02 Thread Nathan Sidwell
In working on c++/83160 I came across this use-once set-to-constant 'variable'. It made me go looking for a non-existent change to it, so I'm eliding it. nathan -- Nathan Sidwell 2018-01-02 Nathan Sidwell * constexpr.c (cxx_bind_parameters_in_call): Remove unneeded

Re: C++ PATCH to add a test for c++/81860

2018-01-02 Thread Nathan Sidwell
81860 * g++.dg/cpp0x/inh-ctor30.C: New test. yes thanks -- Nathan Sidwell

Re: C++ PATCH to add a test for c++/83644

2018-01-02 Thread Nathan Sidwell
On 01/02/2018 11:03 AM, Marek Polacek wrote: Another fixed PR, another additional test. Tested on x86_64-linux, ok for trunk? yes, thanks nathan -- Nathan Sidwell

Re: [C++ PATCH] Fix replace_placeholders (PR c++/83556)

2018-01-02 Thread Nathan Sidwell
/7.3? ok, thanks. nathan -- Nathan Sidwell

Re: [C++ PATCH] Avoid NOP_EXPRs with error_mark_node operand (PR c++/83634)

2018-01-03 Thread Nathan Sidwell
d prefer not to change it. 2018-01-02 Jakub Jelinek PR c++/83634 * cp-gimplify.c (cp_fold) : If the operand folds to error_mark_node, return error_mark_node. * g++.dg/parse/pr83634.C: New test. ok thanks -- Nathan Sidwell

Re: [C++ PATCH] Fix ICE in ~macro_use_before_def (PR preprocessor/83602)

2018-01-03 Thread Nathan Sidwell
nk? 2018-01-02 Jakub Jelinek PR preprocessor/83602 * name-lookup.c (lookup_name_fuzzy): Don't use macro_use_before_def for builtin macros. * g++.dg/cpp/pr83602.C: New test. ok -- Nathan Sidwell

Re: [C++ PATCH] Improve code generation for static_cast of pointers to reference types (PR c++/83555)

2018-01-03 Thread Nathan Sidwell
t assembly -- it'd be $cpu-of-choice specific, of course. nathan -- Nathan Sidwell

Re: C++ PATCH to fix -Wparentheses with MVP (PR c++/83592)

2018-01-03 Thread Nathan Sidwell
sambiguation, is it? It seems we should simply disable the warning in TYPENAME context. ok thanks ('' looks weird to me, but if the warning is annoying, so be it.) nathan -- Nathan Sidwell

Re: [PATCH] Add version to intermediate gcov file (PR gcov-profile/83669).

2018-01-03 Thread Nathan Sidwell
On 01/03/2018 08:25 AM, Martin Liška wrote: This is small enhancement reported by users of gcov tool. I'm aware of current stage of GCC, but it's really small change in code. Apart from that, a small fix to documentation is included. yeah, this is useful, thanks. nathan -- Nathan Sidwell

[PR c++/83667] Fix tree_dump ICE

2018-01-03 Thread Nathan Sidwell
This fixes a tree dumping ICE involving static thunk fns. Copying the thunked-to fn's context suffices. nathan -- Nathan Sidwell 2018-01-03 Nathan Sidwell PR c++/83667 * method.c (make_alias_for): Copy DECL_CONTEXT. PR c++/83667 * g++.dg/ipa/pr83667.C: New. Index: cp/met

Re: C++ PATCH to fix ICE with vector expr folding (PR c++/83659)

2018-01-03 Thread Nathan Sidwell
+{ + reinterpret_cast (&a)[-1] += 1; +} one could make this code well formed with (I think) typedef int V __attribute__ ((__vector_size__ (16))); V a[2]; int main () { return reinterpret_cast (&a[1])[-1]; } That should access the final element of the a[0] vector. nathan -- Nathan Sidwell

Re: [PR c++/83667] Fix tree_dump ICE

2018-01-04 Thread Nathan Sidwell
On 01/04/2018 03:55 AM, Rainer Orth wrote: Hi Nathan, This fixes a tree dumping ICE involving static thunk fns. Copying the thunked-to fn's context suffices. The dump has IPA function summary for void c::*.LLTHUNK0(...)/1 thanks. does this patch work for you? nathan -- N

Re: Location wrappers vs decls that change type (was Re: [v2 of PATCH 03/14] C++: add location_t wrapper nodes during parsing (minimal impl))

2018-01-08 Thread Nathan Sidwell
don't add location wrappers if processing a template * introduce a new tree node for location wrappers (gah) * something I haven't thought of Add a flag on the VIEW_CONVERT/NON_LVALUE expr explicitly noting its wrapperness (rather than infer it from TREE_TYPE == TREE_TYPE (TREE_OPERAND)). TREE_LANG_FLAG_0 looks available? nathan -- Nathan Sidwell

Re: Location wrappers vs decls that change type (was Re: [v2 of PATCH 03/14] C++: add location_t wrapper nodes during parsing (minimal impl))

2018-01-08 Thread Nathan Sidwell
On 01/08/2018 12:14 PM, Jakub Jelinek wrote: On Mon, Jan 08, 2018 at 12:10:50PM -0500, Nathan Sidwell wrote: Both "_S_terminal" VAR_DECLs have a "_CharT" TEMPLATE_TYPE_PARM, but these types are different tree nodes. correct. they are not EQ but are EQUAL (same_type_p

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

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

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

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

[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

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

[C++ PATCH] kill unused enum

2018-01-11 Thread Nathan Sidwell
I noticed this enum, it must have been dead for a long while! nathan -- Nathan Sidwell 2018-01-11 Nathan Sidwell * method.c (enum mangling_flags): Delete long-dead enum. Index: method.c === --- method.c (revision 256541

[C++ PATCH] some reformatting

2018-01-12 Thread Nathan Sidwell
In working on pr83160 I came across some code to cleanup 1) name mark_rvalue_use's final parm to remind us what it is 2) fix poor line breaking in convert_like_real 3) move mark_lvalue_use{,_nonread) close to their friend mark_rvalue_use applying to trunk. nathan -- Nathan Sidwell 2018-

[PR c++/83160] local ref to capture

2018-01-12 Thread Nathan Sidwell
etermine the arg in #1. 'rvaluedness_matches_p' seemed the least worst existing flag to press into service here. WDYT? nathan -- Nathan Sidwell 2018-01-12 Nathan Sidwell PR c++/83160 * cp-tree.h (mark_use): Declare. * expr.c (mark_use): Make extern. * call.c (direct_reference_b

Re: [C++ PATCH] Fix ICE in member_vec_dedup (PR c++/83825)

2018-01-16 Thread Nathan Sidwell
ll cleanup to use the vec.h methods. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? Ok I'm a little surprised we get this case, but I think we've both found other strange boundary cases here. thanks. nathan -- Nathan Sidwell

[C++/83739] bogus error tsubsting range for in generic lambda

2018-01-17 Thread Nathan Sidwell
ng to trunk. nathan -- Nathan Sidwell 2018-01-17 Nathan Sidwell PR c++/83739 * pt.c (tsubst_expr) : Rebuild a range_for if this not a final instantiation. PR c++/83739 * g++.dg/cpp1y/pr83739.C: New. Index: cp/pt.c === --- cp

[C++/83287] Another overload lookup ice

2018-01-17 Thread Nathan Sidwell
than -- Nathan Sidwell 2018-01-17 Nathan Sidwell PR c++/83287 * init.c (build_raw_new_expr): Scan list for lookups to keep. PR c++/83287 * g++.dg/lookup/pr83287-2.C: New. Index: cp/init.c === --- cp/init.c (revision 256795) +++ cp/in

Re: [PR c++/83160] local ref to capture

2018-01-18 Thread Nathan Sidwell
nk we get away with it because class objects always have sufficient lvalueness, but why lie?) nathan -- Nathan Sidwell 2018-01-18 Nathan Sidwell PR c++/83160 * cp-tree.h (mark_use): Declare. * expr.c (mark_use): Make extern. * call.c (direct_reference_binding): Set inner c

[C++] Deprecate old for-scope handling

2018-01-19 Thread Nathan Sidwell
name-lookup machinery, which I ran into again today. Option A: rip out now because it's a c++98 ARM-compatibility crutch Option B: deprecate in gcc-8 and remove in gcc-9. nathan -- Nathan Sidwell

Re: [C++ PATCH] PR c++/83895

2018-01-22 Thread Nathan Sidwell
On 01/21/2018 09:21 AM, Ville Voutilainen wrote: Finishing testing the attached, OK for trunk? ok (I had thought typedefs would be covered by the decl_context == TYPENAME case, but I see that is not true.) nathan -- Nathan Sidwell

[C++ PATCH] Deprecate ARM-era for scopes

2018-01-23 Thread Nathan Sidwell
o-for-scope gives a deprecated warning I noticed that the flag showed signs of being tri-valued at some point, but it is no longer (I suspect at some point we only attempted #a if neither sense of -ffor-scope was given). Cleaned that up. Applying to trunk. nathan -- Nathan Sidwell 2018-01-23 N

Re: [C++ PATCH] Fix a structured binding ICE (PR c++/83958)

2018-01-23 Thread Nathan Sidwell
decomp35.C: New test. ok, thanks -- Nathan Sidwell

[PR c++/839888] Baselink tsubst ICE

2018-01-23 Thread Nathan Sidwell
I added an assert when recently fixing baselink substitution, but the assert is incorrect as this testcase shows. Fixing thusly. nathan -- Nathan Sidwell 2018-01-23 Nathan Sidwell PR c++/83988 * pt.c (tsubst_baselink): Remove optype assert. * ptree.c (cxx_print_xnode): Print

Re: [C++ PATCH] Deprecate ARM-era for scopes

2018-01-23 Thread Nathan Sidwell
On 01/23/2018 01:27 PM, Mike Stump wrote: On Jan 23, 2018, at 4:18 AM, Nathan Sidwell wrote: As discussed (https://gcc.gnu.org/ml/gcc-patches/2018-01/msg01778.html) this patch deprecates the ARM-era for scope. The code gives: if you use %<-fpermissive%> G++ will accept your c

[C++/82878] backport fix

2018-01-26 Thread Nathan Sidwell
I'm applying this backport to the gcc-7 branch. Jonathan was kind enough to point out it's needed tehre. nathan -- Nathan Sidwell 2018-01-26 Nathan Sidwell PR c++/82878 PR c++/78495 * call.c (build_call_a): Don't set CALL_FROM_THUNK_P for inherited ctor.

Re: C++ PATCH to kill cxx_print_statistics

2018-02-01 Thread Nathan Sidwell
rint_statistics): Don't call print_class_statistics. I find no use for it. nathan -- Nathan Sidwell

Re: [PATCH] Revert behavior to r251316.

2018-02-07 Thread Nathan Sidwell
* decl.c (decls_match): Call it if a declaration does not have DECL_FUNCTION_VERSIONED. (maybe_version_functions): record argument is added. ok -- Nathan Sidwell

[C++ PATCH] initializer_list diagnostic

2018-02-08 Thread Nathan Sidwell
when working on 84263 I noticed this initializer_list diagnostic wasn't correctly formatted. Fixing thusly. nathan -- Nathan Sidwell 2018-02-08 Nathan Sidwell * class.c (finish_struct): Fix std:initializer_list diagnostic formatting. * g++.dg/cpp0x/initlist93.C: Adjust diagn

[PR c++/84263] GC ICE with decltype

2018-02-08 Thread Nathan Sidwell
27;if ... else', rather the assembler-level use of a goto! Martin, I've bootstrapped this on an x86_64 native setup, but i686 native is tricky. Are you able to give this a spin? I modified the testcase slightly -- replacing an 'int' with '__SIZE_TYPE__'. nathan -

[PR c/84293] Unexpected strict-alias warning

2018-02-09 Thread Nathan Sidwell
pe = TREE_TYPE (expr); So we may as well drop that arg, substituting a location_t from the caller. That's what this patch does. The callers in the C & C++ FEs pass the EXPR_LOCATION of the pointer being dereferenced, or converted, as appropriate. Joseph, are the C bits ok?

[C++ PATCH]: instantiation via vtable marking

2018-02-14 Thread Nathan Sidwell
;t really helpful. committing to trunk. nathan -- Nathan Sidwell 2018-02-14 Nathan Sidwell gcc/cp/ * decl2.c (mark_vtable_entries): Set input_location to decl's. (c_parse_final_cleanups): Restore input_location after emitting vtables. gcc/testsuite/ * g++.dg/temp

{PR c++/84375] Fix ICE after bad friend

2018-02-16 Thread Nathan Sidwell
This fixes an ICE after attempted friend declaration in a local class. We were going onto push it into the local binding, but that's a binding in the class being defined, because . Just bail out immediately. nathan -- Nathan Sidwell 2018-02-16 Nathan Sidwell PR c++/84375 * name-loo

[C++ PATCH] Deprecate -ffriend-injection

2018-02-16 Thread Nathan Sidwell
;, is less confusing than ': diag...'. 'Now that there is a definitive ISO standard C++, G++ has a specification to adhere to.' We now have several :) nathan -- Nathan Sidwell 2018-02-16 Nathan Sidwell Deprecate -ffriend-injection. * decl.c (cxx_init_decl_processi

Re: [C++ PATCH] Deprecate -ffriend-injection

2018-02-16 Thread Nathan Sidwell
On 02/16/2018 01:52 PM, Sandra Loosemore wrote: The GCC documentation conventions say to use American spellings, not British  so in the patch hunk please s/behaviour/behavior/g American imperialist :) nathan -- Nathan Sidwell 2018-02-16 Nathan Sidwell * doc/extend.texi (Backwards

Re: [C++ PATCH] Deprecate -ffriend-injection

2018-02-16 Thread Nathan Sidwell
" { target *-*-* } cc1plus: " I think I got distracted halfway though editing that. Fixed. nathan -- Nathan Sidwell 2018-02-16 Nathan Sidwell * g++.old-deja/g++.jason/scoping15.C: Fix dg-warning. Index: g++.old-deja/g++.jason/scoping15.C ===

Re: RFC (DECL_CONSTRUCTOR_P): C++ PATCH for c++/83911, ICE with multiversioned constructor

2018-02-16 Thread Nathan Sidwell
e -- it is after all a constructor. But then I've not looked at the code. Might be bored in airports tomorrow ... If I fail to respond, go with your approach. nathan -- Nathan Sidwell

Re: RFC (DECL_CONSTRUCTOR_P): C++ PATCH for c++/83911, ICE with multiversioned constructor

2018-02-17 Thread Nathan Sidwell
[We could move CXX_{CON,DE}STRUCTOR_P functionality into the operator enumeration to free up a couple of flags, but that's definitely a stage 1 change] nathan -- Nathan Sidwell

Re: [PATCH] Make groups more generic (PR gcov-profile/84548).

2018-02-27 Thread Nathan Sidwell
): Properly calculate range of lines for a group. Ok, but fix comment: + /* It's possible to have function that partially overlap, pluralize 'function' +thus take the maximum end_line of got functions. */ 'got functions'? -- Nathan Sidwell

[PR c++/84426] ICE after conflicting member decl

2018-02-27 Thread Nathan Sidwell
adder. nathan -- Nathan Sidwell 2018-02-27 Nathan Sidwell PR c++/84426 * name-lookup.h (get_member_slot): Rename ... (find_member_slot): ... here. (add_member_slot): New. * name-lookup.c (member_vec_linear_search): No need to check for NULL slot. (get_member_slot): Rename ... (find_member_

[PR c++/84602] ICE with anon-struct

2018-02-28 Thread Nathan Sidwell
-- Nathan Sidwell 2018-02-28 Nathan Sidwell PR c++/84602 * name-lookup.h (search_anon_aggr): Add defaulted WANT_TYPE arg. * name-lookup.c (fields_linear_search): Look in an anon-aggr regardless of want_type. (search_anon_aggr): Just use get_class_binding_direct. PR c++/84602 * g++.dg/lookup

[PR c++/84434] ICE with deduction guide

2018-03-01 Thread Nathan Sidwell
the template definitely has. so we should ignore the dependent inherited ctor. Before my name reworking, the lookup during the deduction guide generation never saw the using decl, as it never made it into the special CONSTRUCTOR_SLOT. nathan -- Nathan Sidwell 2018-03-01 Nathan Sidwell PR c++/

[PR c++/84497] ref to undefined tls init

2018-03-02 Thread Nathan Sidwell
to determine whether there must be an init fn. While the patch does indeed work, it may be too pessimal, making the reference weak in more cases than necessary. NEEDS_CONSTRUCTING && !HAS_CONSTEXPR_CTOR && !HAS_DEFAULT_CONSTRUCTOR seems like it would be sufficient. and indeed that works in this case. WDYT? nathan -- Nathan Sidwell

Re: [C++ PATCH] Fix C++ ICE due to CONVERT_EXPR of error_mark_node (PR c++/84662)

2018-03-02 Thread Nathan Sidwell
inel class where the destructor would restore input_location and just use return instead of RETURN. Anyway, bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? ok, thanks nathan -- Nathan Sidwell

<    8   9   10   11   12   13   14   15   16   17   >