Re: Use ODR for canonical types construction in LTO

2019-06-19 Thread Nathan Sidwell
? It'd be great to comment on why you're not just using classtype_as_base there. I suppose I'm serializing this stuff too, with the same inefficiencies ... nathan -- Nathan Sidwell

Re: Use ODR for canonical types construction in LTO

2019-06-19 Thread Nathan Sidwell
. (CLASSTYPE_NON_LAYOUT_POD_P gets set by a bunch of things that don't affect ABI layout) nathan -- Nathan Sidwell

[PR c++/90754] name lookup ICE

2019-06-17 Thread Nathan Sidwell
It turned out qualify_lookup was rejecting non-decls, and hence the ordering of that call relative to other tests was significant. I've restored the relative ordering to that prior to my reimplementation of lookup_type_scope_1. applying to trunk. nathan -- Nathan Sidwell 2019-06-17 Nathan

Re: [C++ PATCH] decls with error_node type

2019-06-05 Thread Nathan Sidwell
On 6/3/19 1:30 PM, Jason Merrill wrote: On 5/31/19 1:39 PM, Nathan Sidwell wrote: The fallout is some error cascade on symbol lookups that now fail. Right, that's why we had the previous behavior, to avoid this extra noise.  And then various places check error_operand_p to avoid trying

Re: [C++ PATCH] structure tag lookup.

2019-06-05 Thread Nathan Sidwell
On 6/4/19 11:20 AM, Marek Polacek wrote: On Tue, Jun 04, 2019 at 11:13:14AM -0400, Nathan Sidwell wrote: [...] + /* Now check if we can look in namespace scope. */ + for (; b->kind != sk_namespace; b = b->level_chain) +if (!(b->kind == sk_cleanup + |

[C++ PATCH] structure tag lookup.

2019-06-04 Thread Nathan Sidwell
reimplemented this so we stop looking when we reach a scope we're not to look in. It also neatly separates the local binding-scope chain walking from the namespace lookup, which is the goal I had. applying to trunk. nathan -- Nathan Sidwell 2019-06-04 Nathan Sidwell * name-lookup.c

Re: [DRIVER PATCH]: Nadger subprocess argv[0]

2019-06-03 Thread Nathan Sidwell
are very implementor-speak, as Sandra would say. But that's not addressed here. On 5/14/19 10:02 AM, Nathan Sidwell wrote: This patch nadgers the driver's subprocess names to include the driver name. It results in more informative error messages.  For instance, rather than:   >./xg++ -B./ frob

[C++ PATCH] decls with error_node type

2019-05-31 Thread Nathan Sidwell
on symbol lookups that now fail. error33.C was particularly screwy: typedef void (A::T) (); would pushing a T into the current scope. Jason, ok? nathan -- Nathan Sidwell 2019-05-31 Nathan Sidwell * decl.c (grokdeclarator): Don't create decls with error_mark_node type. * pt.c

[C++PATCH] Lambda names are anonymous

2019-05-31 Thread Nathan Sidwell
LAMBDA_TYPE_P with: 1) TYPE_LAMBDA_P for cases we have a type 2) DECL_LAMBDA_SCOPE_P for the context case (mirroring DECL_CLASS_SCOPE_P) I'll do that in a later patch. nathan -- Nathan Sidwell 2019-05-31 Nathan Sidwell * cp-tree.h (IDENTIFIER_LAMBDA_P): New. (TYPE_ANON_P): New

[C++ PATCH] template specializations

2019-05-28 Thread Nathan Sidwell
to give it wider exposure than I can on the modules branch. It has survived bootstrap on x86_64-linux. nathan -- Nathan Sidwell 2019-05-28 Nathan Sidwell * decl.c (duplicate_decls): Assert a template newdecl has no specializations. Index: cp/decl.c

[PATCH] Commonize anon-name generation

2019-05-24 Thread Nathan Sidwell
. Would you prefer they just be from the same set of identifiers, with another C++-specific flag bit, or have a somewhat more distinct name, as they do now? (I.e. do you want to be able to distinguish lambdas when debugging just by looking at the string?) nathan -- Nathan Sidwell 2019-05-24 Nathan

Re: [C++ PATCH] Using decls

2019-05-21 Thread Nathan Sidwell
On 5/21/19 10:43 AM, Marek Polacek wrote: Thanks for the patch and sorry for nitpicking: On Tue, May 21, 2019 at 10:32:31AM -0400, Nathan Sidwell wrote: -/* Process a local-scope or namespace-scope using declaration. SCOPE +/* Process a local-scope or namespace-scope using declaration

Re: [C++ PATCH] Using decls

2019-05-21 Thread Nathan Sidwell
On 5/21/19 10:43 AM, Marek Polacek wrote: Thanks for the patch and sorry for nitpicking: On Tue, May 21, 2019 at 10:32:31AM -0400, Nathan Sidwell wrote: -/* Process a local-scope or namespace-scope using declaration. SCOPE +/* Process a local-scope or namespace-scope using declaration

[C++ PATCH] Using decls

2019-05-21 Thread Nathan Sidwell
This patch reimplements using-decl handling. It removes the double lookup of the target name, and commonizes the local- and namespace- scope handling into a single function. Applying to trunk. nathan -- Nathan Sidwell 2019-05-21 Nathan Sidwell gcc/cp/ * name-lookup.h (struct

Re: [C++ PATCH] Commonixe using directive finishing

2019-05-20 Thread Nathan Sidwell
On 5/20/19 10:55 AM, Marek Polacek wrote: On Mon, May 20, 2019 at 09:48:57AM -0400, Nathan Sidwell wrote: + if (attribs != error_mark_node) +for (tree a = attribs; a; a = TREE_CHAIN (a)) + { + tree name = get_attribute_name (a); + if (current_binding_level->k

[C++ PATCH] Commonixe using directive finishing

2019-05-20 Thread Nathan Sidwell
This patch commonizes local- and namespace-scope using directive finishing. While a small cleanup, it matches a more significant using-decl patch I have next. applying to trunk. nathan -- Nathan Sidwell 2019-05-20 Nathan Sidwell gcc/cp/ * name-lookup.c (finish_namespace_using_directive

[C++ PATCH] namespace using directives

2019-05-20 Thread Nathan Sidwell
. As another benefit the diagnostic machinery looking for using namespace std is simplified. Applying to trunk. nathan -- Nathan Sidwell 2019-05-20 Nathan Sidwell * cp-tree.h (struct lang_decl_ns): Remove usings field. (DECL_NAMESPACE_USING): Delete. * name-lookup.c (name_lookup::search_usings

Re: [PATCH] PR c++/90532 Ensure __is_constructible(T[]) is false

2019-05-20 Thread Nathan Sidwell
to use std::is_constructible, which now gives the right answer for arrays of unknown bound. gcc/cp: PR c++/90532 Ensure __is_constructible(T[]) is false * method.c (is_xible_helper): Return error_mark_node for construction of an array of unknown bound. ok, thanks -- Nathan Sidwell

Re: [C++ Patch] Consistently use OVL_P

2019-05-15 Thread Nathan Sidwell
comfortably deal with it. great, thanks for trying that. Marek found the nits. nathan -- Nathan Sidwell

Re: [C++ Patch] Consistently use OVL_P

2019-05-14 Thread Nathan Sidwell
, they're always wrapped in overloads. Could you see if that's true? nathan -- Nathan Sidwell

[DRIVER PATCH]: Nadger subprocess argv[0]

2019-05-14 Thread Nathan Sidwell
++(cc1plus): fatal error: frob.cc: No such file or directory Thoughts? Ok? Stupid idea? nathan -- Nathan Sidwell 2019-05-14 Nathan Sidwell * gcc.c (execute): Splice current executable name into spawned argv[0] for better subprocess diagnostics. (process_command): Do not check if input f

Re: [PATCH 2/3] Fix min_location usage in line-map.c (PR preprocessor/90382).

2019-05-14 Thread Nathan Sidwell
On 5/13/19 7:10 AM, marxin wrote: libcpp/ChangeLog: 2019-05-13 Martin Liska PR preprocessor/90382 * line-map.c (first_map_in_common_1): Handle ADHOC locations. --- ok -- Nathan Sidwell

Re: [PATCH 1/3] Do a refactoring in linemap (PR preprocessor/90382).

2019-05-14 Thread Nathan Sidwell
. nathan -- Nathan Sidwell

[PATCH] A couple of driver cleanups

2019-05-13 Thread Nathan Sidwell
I'm applying this obvious patch. Two hunks deal with inappropriate line breaks, and the first changes the baroque: var = (thing) ? thing : var; into the much clearer if (thing) var = thing; nathan -- Nathan Sidwell 2019-05-13 Nathan Sidwell gcc.c * (execute): Simplify cond

[DWARF] dwarf2out cleanups

2019-05-10 Thread Nathan Sidwell
places. I've replaced that with a bool to control whether we should splice. That at least helped me understand the code better, and should give the optimizer better visibility to simplify the generated control flow. tested on x86_64-linux, ok? nathan -- Nathan Sidwell 2019-05-10 Nathan Sidwell

[C++ PATCH] Kill DECL_SAVED_FUNCTION_DATA

2019-05-08 Thread Nathan Sidwell
function data, and stores the auto pattern in the decl's slot that used to point to the saved data. nathan -- Nathan Sidwell 2019-05-08 Nathan Sidwell Kill DECL_SAVED_FUNCTION_DATA . * cp-tree.h (language_function): Remove x_auto_return_pattern. (current_function_auto_return_pattern): Delete

Re: [libcpp] Reimplement mkdeps data structures

2019-05-07 Thread Nathan Sidwell
. That now causes a null pointer dereference. We shouldn't be registering such blank names. Fixed thusly. I see glibc uses -MT file1\ file1 to register multiple targets, that's somewhat implementation & make specific, but not our problem ... nathan -- Nathan Sidwell 2019-05-07 Nathan Sid

[libcpp] Reimplement mkdeps data structures

2019-05-07 Thread Nathan Sidwell
just record when we stopped adding already-quoted targets. nathan -- Nathan Sidwell 2019-05-07 Nathan Sidwell * include/mkdeps.h (deps_write): Add PHONY arg. (deps_phony_targets): Delete. * init.c (cpp_finish): Just call deps_write. * mkdeps.c (struct mkdeps): Add local vector class

[libcpp] struct deps renaming

2019-05-06 Thread Nathan Sidwell
I have some patches to mkdeps, but first this one renames the rather bland 'struct deps' to 'struct mkdeps'. (discovered when I made myself a local 'struct deps') [mkdeps at least matches the file name, even though it's going to become non make-specific.] nathan -- Nathan Sidwell 2019-05

[C++ PATCH] remove unreachable code

2019-05-02 Thread Nathan Sidwell
Applying this patch to remove code that has become unreachable. We'll already have bailed out if it was a NAMESPACE_DECL. nathan -- Nathan Sidwell 2019-05-02 Nathan Sidwell * semantics.c (finish_id_expression_1): Remove unreachable code. Index: gcc/cp/semantics.c

[C++ PATCH] Simplify class member lookup

2019-05-01 Thread Nathan Sidwell
Here's another simplification I'd accumulated. The final arg to get_class_binding no longer needs to be tri-valued, a simple bool will do. This results in better diagnostics in one testcase. nathan -- Nathan Sidwell 2019-05-01 Nathan Sidwell gcc/cp/ * name-lookup.h

[GC PATCH] Correct TS marking of _EXPR nodes

2019-04-30 Thread Nathan Sidwell
I discovered we were not correctly marking the TS array for language-specific _EXPR nodes. We got away with this because the GC marking used other means for dealing with such nodes. I, however, was relying on it for modules streaming. applying to trunk. nathan -- Nathan Sidwell 2019-04-30

[C++ PATCH] some cleanups

2019-04-29 Thread Nathan Sidwell
. process_outer_var_ref had some unnecessary line-breaks and block scopes. explain_implicit_non_constexpr had some unnecessary repetitiveness. Applying to trunk. nathan -- Nathan Sidwell 2019-04-29 Nathan Sidwell * decl.c (duplicate_decls): Add whitespace, move comments into conditional blocks

[wwwdocs] C++ Coroutines

2019-04-29 Thread Nathan Sidwell
I've committed this as obvious. The TS section didn't note coroutines were in progress. nathan -- Nathan Sidwell Index: projects/cxx-status.html === RCS file: /cvs/gcc/wwwdocs/htdocs/projects/cxx-status.html,v retrieving revision

Re: [C++] compiler incompatibility with lambdas

2019-03-26 Thread Nathan Sidwell
enough to check for different group names. Yes, thanks. nathan -- Nathan Sidwell

Re: [C++ PATCH] Fix lambda capture duplicate handling (PR c++/89767, take 3 & 4)

2019-03-20 Thread Nathan Sidwell
On 3/20/19 1:15 PM, Jakub Jelinek wrote: On Wed, Mar 20, 2019 at 11:10:19AM -0400, Nathan Sidwell wrote: I was unclear. I was for the lazy creation of the hash. I just think it can be lazily created at either the first or second explicit capture. On top of the https://gcc.gnu.org/ml/gcc

Re: [C++ PATCH] Fix lambda capture duplicate handling (PR c++/89767)

2019-03-20 Thread Nathan Sidwell
On 3/20/19 10:48 AM, Jakub Jelinek wrote: On Wed, Mar 20, 2019 at 10:34:51AM -0400, Nathan Sidwell wrote: On 3/19/19 2:14 PM, Jakub Jelinek wrote: add_capture when parsing a lambda introducer uses the IDENTIFIER_MARKED bit to detect duplicate captures. I guess in strict C++11 that could have

Re: [C++ PATCH] Fix lambda capture duplicate handling (PR c++/89767)

2019-03-20 Thread Nathan Sidwell
than zero captures. The next most common after zero would be 1. Besides, identifiers are trivial to hash. nathan -- Nathan Sidwell

[C++] compiler incompatibility with lambdas

2019-03-20 Thread Nathan Sidwell
, any objections for trunk? nathan -- Nathan Sidwell 2019-03-20 Nathan Sidwell * lambda.c (maybe_add_lambda_conv_op): Don't add to comdat group. * g++.dg/abi/lambda-static-1.C: New. Index: cp/lambda.c === --- cp/lambda.c

Re: duplicate using declarations

2019-03-14 Thread Nathan Sidwell
I see this is DR 36. http://wiki.edg.com/pub/Wg21kona2019/CoreWorkingGroup/cwg_active.html#36 I still think we should drop this check, for one thing we don't apply it consistently (eg, naming an unscoped enum value). On 3/14/19 11:47 AM, Nathan Sidwell wrote: Jason, Paolo, This concerns

duplicate using declarations

2019-03-14 Thread Nathan Sidwell
k entirely? There's a bunch of obsolete using decl code I'd like to kill before adding support to modules. nathan -- Nathan Sidwell

Re: [C++ PATCH] PR c++/88123 - lambda and using-directive.

2019-03-08 Thread Nathan Sidwell
On 3/8/19 10:30 AM, Jason Merrill wrote: The comment for push_operator_bindings already says "push the bindings we saved away in maybe_save_op_lookup into the function parameter binding level", are you thinking of something else/more detailed? good enough, thanks -- Nathan Sidwell

Re: [C++ PATCH] PR c++/88123 - lambda and using-directive.

2019-03-08 Thread Nathan Sidwell
operator. Tested x86_64-pc-linux-gnu, applying to trunk. Nathan, does slipping these bindings into the sk_function_parms binding level this way make sense to you? oo sneaky, I like it. Perhaps a comment explaining the surprising scope these are being pushed into? nathan -- Nathan Sidwell

Re: [wwwdocs] update projects/cxx-status.html

2019-03-01 Thread Nathan Sidwell
On 3/1/19 10:30 AM, Jakub Jelinek wrote: On Tue, Feb 26, 2019 at 02:11:03PM -0500, Nathan Sidwell wrote: now modules and coroutines are slated to be in C++20, here's a doc patch for them, pointing at their respective wiki pages. > Several more papers have been accepted apparently, so I

[WWW] update CXX-status

2019-02-26 Thread Nathan Sidwell
Gerald, now modules and coroutines are slated to be in C++20, here's a doc patch for them, pointing at their respective wiki pages. ok? nathan -- Nathan Sidwell ? stat.diff Index: htdocs/projects/cxx-status.html === RCS file

Re: PING^2 Re: [PATCH v2] C++ concepts: fix ICE with requires on dtors (PR c++/89036)

2019-02-13 Thread Nathan Sidwell
On 2/13/19 9:36 AM, David Malcolm wrote: Ping yes, sorry didn't realize you were waiting on me. On Fri, 2019-02-08 at 12:03 -0500, David Malcolm wrote: Ping On Fri, 2019-01-25 at 15:02 -0500, David Malcolm wrote: On Fri, 2019-01-25 at 08:59 -0800, Nathan Sidwell wrote: On 1/25/19 8:48

Re: [backtrace] Avoid segfault

2019-01-25 Thread Nathan Sidwell
ring now -- maybe my debuginfo packages are out of date? nathan -- Nathan Sidwell 2019-01-25 Nathan Sidwell * elf.c (elf_add): Pass "" filename to recursive call with separated debug. Index: elf.c === --- elf.c (revis

Re: [PATCH] C++ concepts: fix ICE with requires on dtors (PR c++/89036)

2019-01-25 Thread Nathan Sidwell
mined from the template parms. Nathan introduced this assertion as part of: ca9219bf18c68a001d62ecb981bc9176b0feaf12 (aka r251340): 2017-08-24 Nathan Sidwell Conversion operators kept on single overload set I'd just drop the assert at this point. nathan -- Nathan Sidwell

[backtrace] Avoid segfault

2019-01-24 Thread Nathan Sidwell
I'm fine with that too. ok? nathan -- Nathan Sidwell 2019-01-24 Nathan Sidwell * elf.c (elf_find_debugfile_by_debuglink): Protect against FILENAME being NULL. Index: libbacktrace/elf.c === --- libbacktrace/elf.c (revision 26

Re: [PATCH] C++: Fix ICE when adding overloaded operator via using_decl (PR c++/88699)

2019-01-17 Thread Nathan Sidwell
* class.c (add_method): Don't use DECL_DESTRUCTOR_P on USING_DECLs. gcc/testsuite/ChangeLog: PR c++/88699 * g++.dg/template/pr88699.C: New test. ok thanks -- Nathan Sidwell

[PR c++/86610] lambda captures in templates

2019-01-16 Thread Nathan Sidwell
changing the test to check DECL's type-dependency makes the right things happen, and a bootstrap passes. Could you review please. nathan -- Nathan Sidwell 2019-01-16 Nathan Sidwell PR c++/86610 * semantics.c (process_outer_var_ref): Only skip dependent types in templates. PR c++/86610 * g

[PR c++/87531] Fix second bug

2018-12-13 Thread Nathan Sidwell
request is moot.) Booted & tested in x86_64-linux, applying to trunk and gcc-8. nathan [*] there's a core or evolution paper about interpreting '<' as a template-id-expr in more places regardless of the binding of the single identifer on its left. -- Nathan Sidwell 2018-12-13 Nathan

[PR c++/87531] operator= lookup in templates

2018-11-28 Thread Nathan Sidwell
with the Core WG. Jason, I decided this approach was cheap enough (and simple) to a rather more involved solution involving marking the template class as having a lazy assign op of some kind, and injecting the using decl at that point. nathan -- Nathan Sidwell 2018-11-28 Nathan Sidwell

[PR 87926] bitmap -Wno-error=array-bounds

2018-11-20 Thread Nathan Sidwell
Applying a more focussed fix, as suggested by Richard. nathan -- Nathan Sidwell 2018-11-20 Nathan Sidwell PR 87926 * Makefile.in (bitmap.o-warn): Use -Wno-error=array-bounds. Index: Makefile.in === --- Makefile.in (revision

Re: [PATCH[ Fix pr87269.C testcase

2018-11-16 Thread Nathan Sidwell
Yeah, thanks Jakubnathan-- Nathan Sidwell Original message From: Jakub Jelinek Date: 11/16/18 15:50 (GMT-05:00) To: Nathan Sidwell , Jason Merrill Cc: GCC Patches Subject: [PATCH[ Fix pr87269.C testcase On Fri, Nov 16, 2018 at 10:01:05AM -0500, Nathan Sidwell wrote:> 2

[C++ PATCH] OVL_USED not needed

2018-11-16 Thread Nathan Sidwell
away. It is unreachable. Applying to trunk. nathan -- Nathan Sidwell 2018-11-16 Nathan Sidwell Remove ovl_used, it is no longer needed * cp-tree.h (OVL_USED_P): Delete. (lookup_keep): Delete. * friend.c (add_friend): Don't call it. * parser.c (lookup_literal_operator): Like

[PR c++/87269] Mark string operator overload in template defn.

2018-11-16 Thread Nathan Sidwell
This was a case of not marking the overloads of a lookup as immutable, leading to an assert failure. Applying to trunk. nathan -- Nathan Sidwell 2018-11-16 Nathan Sidwell PR c++/87269 * parser.c (lookup_literal_operator): Mark overload for keeping when inside template. Refactor. * g

Re: [PATCH] Reject too large string literals (PR middle-end/87854)

2018-11-16 Thread Nathan Sidwell
similar for string literals. As internally we use host int as TREE_STRING_LENGTH, this is relevant to targets that have < 32-bit size_t only. The following patch adds that diagnostics and truncates the string literals. Ok by me. nathan -- Nathan Sidwell

[PR c++/86246] ICE tsubst explicit operator call

2018-11-15 Thread Nathan Sidwell
sted on x86_64-linux, applying to trunk. nathan -- Nathan Sidwell 2018-11-15 Nathan Sidwell PR c++/86246 PR c++/87989 * typeck.c (finish_class_member_access_expr): Conversion operator to dependent type is dependent. * g++.dg/template/pr86246.C: New. * g++.dg/template/pr87989.C: New. Index

[C++ DR 2336] virtual dtors, exception specs & abstract classes

2018-11-15 Thread Nathan Sidwell
(it does not distinguish between virtual and non-virtual dtors of virtual bases). booted on x6_64-linux, committing to trunk. nathan -- Nathan Sidwell 2018-11-15 Nathan Sidwell DR 2336 * cp-tree.h (enum special_function_kind): Add sfk_virtual_destructor. * method.c (type_has_trivial_fn

[C++ DR 2336] Clean up synth walkers first

2018-11-15 Thread Nathan Sidwell
removes that confusion. I reorder SFK members to be useful for these functions, add a set of new predicates and then adjust the 3 functions to use those predicates, drop the bools and consistently order their parameters. Applying to trunk after an x6_64-linux bootstrap. nathan -- Nathan Sidwell

Re: [debug/88006] -fdebug-types-section gives undefined ref

2018-11-14 Thread Nathan Sidwell
Similarly for SYMBOL_REFs, keep only those that refer to something that has been emitted in the current CU. */ static void resolve_addr (dw_die_ref die) { That does seem to work. The attached survise bootstrapping on x86_64-linux, ok? nathan -- Nathan Sidwell 2018-11-14 Nathan Sidwell PR d

[debug/88006] -fdebug-types-section gives undefined ref

2018-11-14 Thread Nathan Sidwell
a symtab entry seems significant? booted & tested on x86_64-linux, ok? nathan -- Nathan Sidwell 2018-11-14 Nathan Sidwell PR debug/88006 PR debug/87462 * dwarf2out.c (const_ok_for_output_1): Check symtab for internal decls. * g++.dg/debug/dwarf2/pr87462.C: New. * g++.dg/debug/dwa

[PR/87936] --disable-checking bootstrap break

2018-11-07 Thread Nathan Sidwell
I'm committing this to unbreak a --disable-checking bootstrap build failure. As documented in the PR we think there's an out of bound array access. nathan -- Nathan Sidwell 2018-11-07 Nathan Sidwell PR 87926 * Makefile.in (bitmap.o-warn): Add -Wno-error to unbreak --disable-checking

[PR C++/87904] lookup ICE

2018-11-07 Thread Nathan Sidwell
My recent relaxing of overload ordering broken an invariant that unhiding a hidden decl was assuming. Fixed thusly. nathan -- Nathan Sidwell 2018-11-07 Nathan Sidwell PR c++/87904 * cp-tree.h (struct tree_overload): Fix comment. * tree.c (ovl_iterator::reveal_node): Propagate

[C++ PATCH] refactor duplicate_decls

2018-11-02 Thread Nathan Sidwell
. Applying to trunk after an x86_64-linux bootstrap. nathan -- Nathan Sidwell 2018-11-01 Nathan Sidwell gcc/cp/ * decl.c (duplicate_decls): Refactor checks. * name-lookup.c (name_lookup::process_module_binding): Only pubic namespaces are shared. gcc/testsuite/ * g++.dg/lookup/crash6.C: Adjust

[ABI PATCH] static anonymous unions of function scope

2018-10-31 Thread Nathan Sidwell
inux nathan -- Nathan Sidwell 2018-10-31 Nathan Sidwell * cp-tree.h (struct lang_function): Delete x_local_names field. (struct lang_decl_base): Rename u2sel to spare. (struct lang_decl_min): Remove lang_decl_u2 union. Keep access field. (LANG_DECL_U2_CHECK): Delete. (DECL_DISCRIMINAT

[C++ PATCH] missed testcase

2018-10-31 Thread Nathan Sidwell
I missed committing this testcase with the recent unsorted overload change. nathan -- Nathan Sidwell 2018-10-31 Nathan Sidwell * g++.dg/lookup/friend21.C: New. Index: testsuite/g++.dg/lookup/friend21.C === --- testsuite/g++.dg

[PATCH] command line macros

2018-10-31 Thread Nathan Sidwell
handling afterwards. booted and tested on x86_64-linux, applying to trunk. nathan -- Nathan Sidwell 2018-10-31 Nathan Sidwell * c-opts.c (c_finish_options): Force command line macro location. Refactor to avoid repeating main debug hook. (push_command_line_include): Clarify comment. Index: gcc/c

Re: [5/6] Preprocessor include

2018-10-31 Thread Nathan Sidwell
On 10/31/18 11:44 AM, Marek Polacek wrote: + else if (to_free) +free ((void *)to_free); free (NULL) is ok so do you really need the check? Probably not :) IIRC the if (X) free (X) idiom was nearby, and I didn't feel like rocking that boat. nathan -- Nathan Sidwell

[6/6] Preprocessor forced macro location

2018-10-31 Thread Nathan Sidwell
UNKNOWN_LOCATION, I'd argue you're doing it wrong. This patch changes that API to take a location directly, and ban forcing UNKNOWN_LOCATION. booted & tested on x86_64-linux (as were all the others). Applying to trunk. nathan -- Nathan Sidwell 2018-10-31 Nathan Sidwell libcpp/ * intern

[5/6] Preprocessor include

2018-10-31 Thread Nathan Sidwell
[Yes, I can't count] Include file handling duplicated cleanup code in each exit path. Simpler to just commonize it with goto. Also noticed a memory leak in buffer popping. Applying to trunk. -- Nathan Sidwell 2018-10-31 Nathan Sidwell * directives.c (do_include_common): Commonize

[4/7] Preprocessor location-kind predicates

2018-10-31 Thread Nathan Sidwell
This fills out the set of location-kind predicates, and uses them in a couple more places. There may well be other places that could benefit. Applying to trunk. -- Nathan Sidwell 2018-10-31 Nathan Sidwell * include/line-map.h (IS_ORDINARY_LOC, IS_MACRO_LOC): New predicates

[3/7] Preprocessor macro loc

2018-10-31 Thread Nathan Sidwell
Now that the cpp_macro structure is properly part of cpplib.h, we don't need to outline its location accessor function. Made inline thusly. Cleaned up duplicate macro checking a bit too. applying to trunk nathan -- Nathan Sidwell 2018-10-31 Nathan Sidwell * include/cpplib.h

[2/7] Preprocessor node access

2018-10-31 Thread Nathan Sidwell
The hashnode identifier accessor macro unnecessarily casts its operand, and the derived accessors don't use it. Fixed thusly. applying to trunk. -- Nathan Sidwell 2018-10-31 Nathan Sidwell * include/cpplib.h (HT_NODE): Don't cast NODE. (NODE_LEN, NODE_NAME): Use HT_NODE. Index: libcpp

[1/7] Preprocessor cleanup

2018-10-31 Thread Nathan Sidwell
indentation error fixed too. Applying to trunk. nathan -- Nathan Sidwell 2018-10-31 Nathan Sidwell * directives.c (DIRECTIVE_TABLE): Drop historical frequency comments. * files.c (_cpp_stack_file): Fix indentation. Index: libcpp/directives.c

[C++ PATCH] Simplify overloads

2018-10-31 Thread Nathan Sidwell
) decl to find out it was needed. I've been using a variant of this on the modules branch for some time. booted & tested on x86_64-linux, applying to trunk. nathan -- Nathan Sidwell 2018-10-31 Nathan Sidwell gcc/cp/ * cp-tree.h (OVL_DEDUP_P): New. * name-lookup.c (name_lo

[C++ PATCH] more TU parsing refactoring

2018-10-12 Thread Nathan Sidwell
processing is moved to cp_parser_translation_unit. If you're switching between differently IEC headers inside a namespace, or extern-C region, you're doing it very wrong. Built and tested on x86_64-linux and powerpc8-aix (the remaining implicit extern C target). nathan -- Nathan Sidwell 2018-10-12

[C++ PATCH] parser simplification

2018-10-11 Thread Nathan Sidwell
than Sidwell 2018-10-11 Nathan Sidwell cp/ * parser.c (cp_parser_translation_unit): Return void. Don't fail at first extra }, simplify logic. (c_parse_file): Call finish_translation_unit here. testsuite/ * g++.dg/parse/close-brace.C: New. * g++.dg/cpp0x/noexcept16.C: Avoid warning. * g++

[PATCH] A couple of line map fixes

2018-10-11 Thread Nathan Sidwell
. It seems we don't always use all those locations, and so can have trailing garbage. booted & tested on x86_64-linux. Fixing thusly. nathan -- Nathan Sidwell 2018-10-11 Nathan Sidwell * include/line-map.h (LINEMAPS_MACRO_LOWEST_LOCATION): Fix off-by-one error. * line-m

[C++ PATCH] String concatenation is a thing

2018-10-04 Thread Nathan Sidwell
We've had string literal concatenation since we dropped K build support. Let's use it to make things more readable. Applying to trunk. nathan -- Nathan Sidwell 2018-10-04 Nathan Sidwell * lang-specs.h: Use string contatenation, not line splicing. Index: lang-specs.h

Re: C++ PATCH to implement C++20 P0892R2 - explicit(bool)

2018-10-03 Thread Nathan Sidwell
th any explicit-specifier, if it is, substitute it, and set DECL_NONCONVERTING_P accordingly. Sounds right, maybe with the flag idea I mentioned in the other email to say it's worth looking in the hash table. Hashing can be by tree address of course. natha -- Nathan Sidwell

Re: C++ PATCH to implement C++20 P0892R2 - explicit(bool)

2018-10-03 Thread Nathan Sidwell
simple thing of growing lang_decl_fn. It seems the better approach is a flag in the function_decl (or it's decl_lang_specific extension) to say 'go look over there', and a hash table you know will contain something. nathan -- Nathan Sidwell

Re: [PATCH c++/pr87295] -fdebug-types-section ICE

2018-10-02 Thread Nathan Sidwell
Ping? On 9/17/18 7:30 AM, Nathan Sidwell wrote: Richard, this patch makes the ICE go away, but I really don't know if it's correct.  When cloning the type die I copy die_id, so it is found during the (currently ICEing) hash lookup.  In this particular testcase we clone the die twice.  Once

[libiberty] Use pipe inside pex_run

2018-10-01 Thread Nathan Sidwell
uild, and I've tested on AIX (where vfork is fork) as well asx86_64-linux. nathan -- Nathan Sidwell 2018-10-01 Nathan Sidwell * configure.ac (checkfuncs): Add pipe2. * config.in, configure: Rebuilt. * pex-unix.c (pex_unix_exec_child): Comminicate errors from child to parent with a pipe,

Re: [C++ Patch] PR 85070 ("[8/9 Regression] ICE on C++ code: in lazily_declare_fn, at cp/method.c:2409")

2018-09-24 Thread Nathan Sidwell
x86_64-linux. ok -- Nathan Sidwell

[PATCH c++/86881] -Wshadow-local-compatible ICE

2018-09-18 Thread Nathan Sidwell
type. But that's not a new problem. Applying to trunk and gcc-8 nathan -- Nathan Sidwell 2018-09-18 Nathan Sidwell PR c++/86881 cp/ * name-lookup.c (check_local_shadow): Ignore auto types. testsuite/ * g++.dg/warn/pr86881.C: New. Index: gcc/cp/name-lookup.c

[PATCH c++/pr87295] -fdebug-types-section ICE

2018-09-17 Thread Nathan Sidwell
1e in main (argc=8, argv=0x7fffe668) at ../../../src/gcc/main.c:39 (gdb) -- Nathan Sidwell 2018-09-17 Nathan Sidwell PR c++/87295 * dwarf2out.c (clone_as_declaration): Copy die_id and set comdat_type_p as appropriate. Index: dwarf2out.c ==

[PR debug/87295] ICE in dwarf2out

2018-09-13 Thread Nathan Sidwell
pes. The incoming die is DW_TAG_structure_type with comdat_type_p set. We create a new_die_raw, which has NULL die_id.die_symbol and then never set that field (or another piece of the die_id union). How is this supposed to work? nathan -- Nathan Sidwell

Re: [PATCH] Add quotes for -fconstexpr-depth= in an error message.

2018-09-12 Thread Nathan Sidwell
On 9/12/18 6:17 AM, Martin Liška wrote: PING^1 gcc/cp/ChangeLog: 2018-08-28 Martin Liska * constexpr.c (cxx_eval_call_expression): Add quotes to -fconstexpr-depth=. ok, thanks -- Nathan Sidwell

Re: [C++, wwwdocs] bugs/index.html - complete C++ non-bug entry

2018-09-12 Thread Nathan Sidwell
helps. nathan -- Nathan Sidwell

Re: [wwwdocs] Document 87137 fix

2018-09-12 Thread Nathan Sidwell
On 9/6/18 12:24 PM, Gerald Pfeifer wrote: Hi Nathan, On Wed, 5 Sep 2018, Nathan Sidwell wrote: this documents the fix for pr87137. Discovered as a GCC-8 regression, turned out to be an ABI bug. Decided to fix the entire bug in one go. Are these changes.html changes ok? thanks for doing

Re: [driver] Use regular error routines

2018-09-11 Thread Nathan Sidwell
testing. nathan -- Nathan Sidwell 2018-09-11 Nathan Sidwell * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'. Index: gcc.c === --- gcc.c (revision 264216) +++ gcc.c (working copy) @@ -2102,7 +2102,7 @@ load_specs

[driver] Use regular error routines

2018-09-11 Thread Nathan Sidwell
ing to say. booted & tested on x86_64-linux, installing as obvious. nathan -- Nathan Sidwell 2018-09-11 Nathan Sidwell * gcc.c (perror_with_name, pfatal_with_name): Delete. (load_specs): Use fatal_error. (DELETE_IF_ORDINARY, process_command): Use error. (execute, run_attempt): U

[PATCH] internalize a driver fn

2018-09-09 Thread Nathan Sidwell
I discovered pfatal_with_name is only used inside gcc.c. Making it static as obvious. nathan -- Nathan Sidwell 2018-09-09 Nathan Sidwell * gcc.h (pfatal_with_name): Don't declare here. * gcc.c (pfatal_with_name): Make static. Index: gcc.c

[wwwdocs] Document 87137 fix

2018-09-05 Thread Nathan Sidwell
Gerald, this documents the fix for pr87137. Discovered as a GCC-8 regression, turned out to be an ABI bug. Decided to fix the entire bug in one go. Are these changes.html changes ok? Patch discussion at https://gcc.gnu.org/ml/gcc-patches/2018-08/msg01900.html nathan -- Nathan Sidwell Index

[PR c++/87185] ICE in prune-lambdas

2018-09-05 Thread Nathan Sidwell
I'm applying this patch of Pádraig's. It's a sufficiently obvious NULL-ptr-dereference fix. tested on x86_64-linux. nathan -- Nathan Sidwell 2018-09-05 Pádraig Brady p...@draigbrady.com cp/ PR c++/87185 * lambda.c (prune_lambda_captures): Protect against const_vars.get returning NULL

Re: [PATCH, OpenACC] Support C++ "this" in OpenACC directives (PR66053)

2018-08-31 Thread Nathan Sidwell
data. It might be wise to look at the DR's and changes relating to lambdas and this capture. Those changes now make it much harder to simply capture the pointer unintentionally. nathan -- Nathan Sidwell

[PR c++/87155] Anonymous namespace and

2018-08-31 Thread Nathan Sidwell
than -- Nathan Sidwell 2018-08-31 Nathan Sidwell PR c++/87155 PR c++/84707 cp/ * name-lookup.c (name_lookup::search_namespace): Don't look at inlines when searching for NULL names. testsuite/ * g++.dg/cpp0x/pr87155.C: New. * g++.dg/cpp0x/inline-ns10.C: Adjust. Index: gcc/cp/name-look

[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

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