c++: Kill DECL_ANTICIPATED

2020-10-02 Thread Nathan Sidwell
st. pushing to trunk nathan -- Nathan Sidwell diff --git i/gcc/cp/cp-tree.h w/gcc/cp/cp-tree.h index 43e0c18ec03..c9ad75117ad 100644 --- i/gcc/cp/cp-tree.h +++ w/gcc/cp/cp-tree.h @@ -2657,8 +2657,10 @@ struct GTY(()) lang_decl_base { unsigned not_really_extern : 1; /* var or fn */ unsi

Re: c++: Hash table iteration for namespace-member spelling suggestions

2020-10-05 Thread Nathan Sidwell
On 10/5/20 5:48 AM, Christophe Lyon wrote: On Fri, 2 Oct 2020 at 20:23, Nathan Sidwell wrote: Hi Nathan, This is causing regressions on aarch64 and arm when using -mfloat-abi=hard (or configuring for arm-linux-gnueabihf). The logs says: FAIL: c-c++-common/spellcheck-reserved.c -std=gnu

Re: Patch ping

2020-10-05 Thread Nathan Sidwell
inting out. As you say, it's not the original source :) nathan -- Nathan Sidwell

c++: Make spell corrections consistent

2020-10-05 Thread Nathan Sidwell
(maybe_add_fuzzy_decl): New. (maybe_add_fuzzy_binding): New. (consider_binding_level): Use intermediate sortable vector for namespace bindings. gcc/testsuite/ * c-c++-common/spellcheck-reserved.c: Restore diagnostic. pushing to trunk nathan -- Nathan Sidwell

Re: c++: Make spell corrections consistent

2020-10-05 Thread Nathan Sidwell
On 10/5/20 10:17 AM, Jakub Jelinek wrote: On Mon, Oct 05, 2020 at 09:39:01AM -0400, Nathan Sidwell wrote: My change to namespace-scope spell corrections ignored the issue that different targets might have different builtins, and therefore perturb iteration order. This fixes it by using an

c++: Adding exception specs can changed dependentness

2020-10-07 Thread Nathan Sidwell
I found it). gcc/cp/ * tree.c (build_cp_fntype_variant): Clear TYPE_DEPENDENT_P_VALID if necessary. nathan -- Nathan Sidwell diff --git i/gcc/cp/tree.c w/gcc/cp/tree.c index 8b7c6798ee9..074fa0c025e 100644 --- i/gcc/cp/tree.c +++ w/gcc/cp/tree.c @@ -2638,6 +2638,9

c++: Rename DECL_BUILTIN_P to DECL_UNDECLARED_BUILTIN_P

2020-10-07 Thread Nathan Sidwell
sing_decl): Likewise. libcc1/ * libcp1plugin.cc (supplement_binding): Rename DECL_BUILTIN_P. pushing to trunk nathan -- Nathan Sidwell diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index c9ad75117ad..22700844fac 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.

c++: block-scope externs get an alias [PR95677,PR31775,PR95677]

2020-10-07 Thread Nathan Sidwell
tern-1.cc: ... here ... * g++.dg/other/nested-extern-2.cc: ... here. * g++.dg/template/scope5.C: Avoid ill-formed * g++.old-deja/g++.law/missed-error2.C: Allow extension. * g++.old-deja/g++.pt/crash3.C: Add expected error. pushing to trunk nathan -- Nathan Sidwell dif

libcpp: Directly peek for initial line marker

2020-10-08 Thread Nathan Sidwell
peek the buffer directly before trying to tokenize. (read_original_directory): Likewise. Directly prod the string literal. * files.c (_cpp_stack_file): Adjust for IT_PRE_MAIN change. pushing to trunk, nathan -- Nathan Sidwell diff --git i/libcpp/files.c w/libcp

[c++] New module mangling ABI

2022-03-04 Thread Nathan Sidwell
moving to this ABI and documentation will be added to the Itanium ABI specification. -- Nathan SidwellFrom 73baba1ae1b8f3618c2d3b674117b8a462e0ca76 Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Wed, 2 Mar 2022 19:13:43 -0500 Subject: [PATCH 1/2] c++: New module mangling ABI This implements a

[PATCH] c++: Standard mangling abbreviations & modules

2022-03-04 Thread Nathan Sidwell
The std manglings for things like std::string should not apply if we're not in the global module. nathan -- Nathan SidwellFrom 591d2130348b15ec9158bb69a7fd9442bb81fa3a Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Wed, 2 Mar 2022 19:42:23 -0500 Subject: [PATCH] c++: Standard man

[coroutines] member slicing fix

2022-02-28 Thread Nathan Sidwell
itself in Folly, and it was too difficult to extract a testcase. nathan -- Nathan Sidwell Summary: The ported coroutine patches still contained a bug. It could cause object slicing and bit copying when the compiler got confused about the lifetime of a member access. It needs to look at

[coroutines] expanding inside a template

2022-02-28 Thread Nathan Sidwell
ine the type of the co_await expression using the DEPENDENT_EXPR wrapper machinery. That allows us to determine the subexpression type, but leave its operand unchanged and then instantiate it later. I'm not sure if the std explicitly calls out this dependent-subexpr-type wrinkle. nath

gender-agnostic pronouns

2021-11-30 Thread Nathan Sidwell
an SidwellFrom b5a0f250f0f05364a51c331d040d78bf15057884 Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Tue, 30 Nov 2021 07:12:44 -0500 Subject: [PATCH] Use gender-agnostic pronouns Use they/them/their in non-historical documents --- htdocs/bugs/management.html | 6 +++--- htdocs/contribute.html | 2 +- htdoc

[c++][NFC] Rename Attached to Keyed

2022-05-09 Thread Nathan Sidwell
key virtual function (from the ABI), which is why I went with 'attached'. However, I think 'keyed' is the less worse name. I think there's less chance of confusion. nathan -- Nathan SidwellFrom c0718dc18559912e6228aaabae0c34ff12b63288 Mon Sep 17 00:00:00 2001 From: Natha

[c++] Disambiguate ModuleKind flags

2022-05-10 Thread Nathan Sidwell
amed-module vs header-unit from the MODULE/GLOBAL flags. 2) Replace the MODULE/GLOBAL flags with PURVIEW & ATTACH flags. 3) Adjust the parser state handling. Lays ground-work for language-declaration changes. nathan -- Nathan SidwellFrom 92d6a0d28bff543bb2ccb9d9ccadb9ef3349ee29 Mon Sep

[c++] Add module attachment

2022-05-11 Thread Nathan Sidwell
ns (particularly the builtins), which was a little warty. Some other internal APIs get similarly clarified. The main event is the next patch though ... nathan -- Nathan SidwellFrom a92ed39c416b2a92f404d9851fdfea5cae7e6b21 Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Mon, 9 May 2022 04:47:14 -

c++: Support module language-decl semantics

2022-05-12 Thread Nathan Sidwell
this might help with modularizing std? nathan -- Nathan SidwellFrom 78c8b0b980341f28de96da518a38bf85bbd24d98 Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Mon, 9 May 2022 04:51:32 -0700 Subject: [PATCH] c++: Support module language-decl semantics In modules purview, one can attach a decl

c++: Local symbols do not get module manglings

2022-05-13 Thread Nathan Sidwell
Internal-linkage entity mangling is entirely implementation defined -- there's no ABI issue. Let's not mangle in any module attachment to them, it makes the symbols unnecessarily longer. nathan -- Nathan SidwellFrom 8dc7e0287223bfe48f16cfc10ee87cd5ff05f277 Mon Sep 17 00:00:00 2001 Fr

demangler: Structured Bindings

2022-05-17 Thread Nathan Sidwell
C++ Structured bindings have a mangling that has yet to be formally documented. However, it's been around for a while and shows up for module support. This adds it to the demangler. nathan -- Nathan SidwellFrom 451894cadcf1210883ceefb2d69a0ed2d6a8cd8b Mon Sep 17 00:00:00 2001 From: N

demangler: Reorganize for module demangling

2022-05-18 Thread Nathan Sidwell
Module demangling requires some changes in how substitutions are handled. This adjusts things to make that possible, these are similar changes to that made in the the llvm demangler. nathan -- Nathan SidwellFrom 65851d65fb36e847a9b8ef3b0519f06d29865a14 Mon Sep 17 00:00:00 2001 From: Nathan

demangler: C++ modules support

2022-05-23 Thread Nathan Sidwell
e): Add 'GI' support. (d_count_template_scopes): Adjust. (d_print_comp_inner): Print module. * testsuite/demangle-expected: New test cases -- Nathan SidwellFrom b7feb71d45e4cd894d7706c21a21a3871070d098 Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Tue, 8 Mar 2022 12:54:03 -0800

[C++ PATCH] 'std' identifier not needed

2019-10-23 Thread Nathan Sidwell
There's no need to retain "std" identifier as a global tree -- we can simply use {push,/pop}_ nested_namespace on the std_node we have there. Also simplify the in-std-namespace predicate by checking against std::node. applying to trunk. nathan -- Nathan Sidwell 2019-10-23

[dump] small source cleanup

2019-10-24 Thread Nathan Sidwell
due to my own stupidity I found myself wandering into dump_begin, but then got confused due to an uninitialized pointer not pointing to somewhere totally insane. Applying this cleanup patch to initialize the decls at creation time. nathan -- Nathan Sidwell 2019-10-24 Nathan Sidwell

[C++ PATCH] Template parm index fix

2019-10-24 Thread Nathan Sidwell
the original type into reduce_template_parm_level, rather than the copied type. This just seems wrong, and with the above change would become (more?) broken. Every other call to RTPL passes in the copied type. Applying to trunk. nathan -- Nathan Sidwell 2019-10-24 Nathan Sidwell

[C++ PATCH] simplify deferred parsing lexer

2019-10-28 Thread Nathan Sidwell
tokens -- currently we think they have no location, because they're (nearly) always the shared eof_token. that's a later change, as it could change some diagnostic locations in the testsuite [to be better]. applying to trunk. nathan -- Nathan Sidwell 2019-10-28 Nathan Sidwell

[C++ PATCH] Feature macros are long

2019-10-30 Thread Nathan Sidwell
Jakub, Thomas: cpp_define (pfile, "_OPENACC=201306"); cpp_define (pfile, "_OPENMP=201511"); those two macros might need suffixing too, but I don't have a std handy. nathan -- Nathan Sidwell 2019-10-30 Nathan Sidwell * c-cppbuiltin.c (c_cpp_builtins): Add 'L&#x

Re: [C++ PATCH] Feature macros are long

2019-10-30 Thread Nathan Sidwell
On 10/30/19 12:36 PM, Jakub Jelinek wrote: On Wed, Oct 30, 2019 at 12:33:00PM -0400, Nathan Sidwell wrote: As discussed on IRC, this adds an L suffix to C++ feature macros, as specified by the std. I'd forgotten that in preprocessor-land, expressions are evaluated as longs anyway, but the

Re: [PATCH] Fix libcpp #pragma {push,pop}_macro handling of builtin macros (PR preprocessor/92296)

2019-10-31 Thread Nathan Sidwell
onst builtin_macro *b = ... nathan -- Nathan Sidwell

[C++ PATCH] cleanup check_field_decls

2019-11-01 Thread Nathan Sidwell
idn't move the check into pt.c, which may be a better place. committing to trunk. nathan -- Nathan Sidwell 2019-11-01 Nathan Sidwell cp/ * class.c (check_field_decls): Refactor. testsuite/ * g++.dg/template/fn.C: New. Index: gcc/cp/class.c ===

[PR c++/92370] ICE with VC marker

2019-11-05 Thread Nathan Sidwell
we'd run out of locations and every token was UNKNOWN_LOCATION. Applying to trunk. nathan -- Nathan Sidwell 2019-11-05 Nathan Sidwell cp/ PR c++/92370 * parser.c (cp_parser_error_1): Check EOF and UNKNOWN_LOCATION when skipping over version control marker. testsuite/ PR c++/92370 * g

[PR c++/6936] Delete duplicate test

2019-11-12 Thread Nathan Sidwell
6936 and using38 are the same test. Deleting one of them. nathan -- Nathan Sidwell 2019-11-12 Nathan Sidwell * g++.dg/lookup/pr6936.C: Delete, identical to using38.C Index: g++.dg/lookup/pr6936.C === --- g++.dg/lookup/pr6936

[C++ PATCH] Merge some using-decl handling

2019-11-12 Thread Nathan Sidwell
member enumerators. It makes sense to handle the lookup of using decls in one place, rather than duplicate the handling. This patch does that, with no change to semantics. Some error messages change, that is all. nathan -- Nathan Sidwell 2019-11-12 Nathan Sidwell gcc/cp/ * name-lookup.c

Re: Rename DECL_IS_BUILTIN to DECL_IS_UNDECLARED_BUILTIN

2020-11-02 Thread Nathan Sidwell
On 10/23/20 8:48 AM, Nathan Sidwell wrote: Patch affects C++, C, GO, common-core ping? In cleaning up C++'s handling of hidden decls, I renamed its DECL_BUILTIN_P, which checks for loc == BUILTINS_LOCATION to DECL_UNDECLARED_BUILTIN_P, because the location gets updated, if user s

cpplib: Macro use location and comparison

2020-11-02 Thread Nathan Sidwell
ation parameter. pushing to trunk -- Nathan Sidwell diff --git i/libcpp/directives.c w/libcpp/directives.c index f59718708e4..d7b59aae901 100644 --- i/libcpp/directives.c +++ w/libcpp/directives.c @@ -1134,6 +1134,7 @@ _cpp_do_file_change (cpp_reader *pfile, enum lc_reason reason, prep

core: debug-print whole call expr

2020-11-02 Thread Nathan Sidwell
In debugging some call-expr handling, I got confused because the debug printer elided NULL call operands. This changes the printer to display them as NULL. gcc/ * print-tree.c (print_node): Display all the operands of a call expr. pushing to trunk -- Nathan Sidwell

core: id_equal should forward

2020-11-02 Thread Nathan Sidwell
I noticed the two id_equal functions directly called strcmp. This changes one of them to call the other with args swapped. gcc/ * tree.h (id_equal): Call the symetric predicate with swapped arguments. pushing to trunk -- Nathan Sidwell diff --git c/gcc/tree.h w/gcc

core: Synchronize tree-cst & wide-int caching expectations

2020-11-02 Thread Nathan Sidwell
a comment about that. gcc/ * tree.c (cache_integer_cst): Fixup pointer caching to match wide_int_to_type_1's expectations. Add comment. pushing to trunk nathan -- Nathan Sidwell diff --git i/gcc/tree.c w/gcc/tree.c index 81f867ddded..a576b986f8b 100644 --- i/gcc/tree.c ++

options: Tiny refactor

2020-11-02 Thread Nathan Sidwell
This changes more on the modules branch, but let's move the declaration to the initializer now. gcc/c-family/ * c-opts.c (c_common_post_options): Move var decl to its initialization point. pushing to trunk -- Nathan Sidwell diff --git i/gcc/c-family/c-opts.c w/

c++: Some additional tests

2020-11-02 Thread Nathan Sidwell
g to trunk -- Nathan Sidwell diff --git c/gcc/testsuite/g++.dg/concepts/pack-1.C w/gcc/testsuite/g++.dg/concepts/pack-1.C new file mode 100644 index 000..b4f2c36374d --- /dev/null +++ w/gcc/testsuite/g++.dg/concepts/pack-1.C @@ -0,0 +1,31 @@ +// { dg-do compile { target c++17 } } +// {

c++: Delete unused hash type

2020-11-02 Thread Nathan Sidwell
ete. (cxx_int_tree_map_hasher::hash): Delete. pushing to trunk -- Nathan Sidwell diff --git i/gcc/cp/cp-gimplify.c w/gcc/cp/cp-gimplify.c index 44c9d249b15..064a44ca3e5 100644 --- i/gcc/cp/cp-gimplify.c +++ w/gcc/cp/cp-gimplify.c @@ -680,22 +680,6 @@ is_invisiref_parm (const_tre

c++: refactor duplicate decls

2020-11-02 Thread Nathan Sidwell
A couple of paths in duplicate decls dealing with templates and builtins were overly complicated. Fixing thusly. gcc/cp/ * decl.c (duplicate_decls): Refactor some template & builtin handling. applying to trunk nathan -- Nathan Sidwell diff --git i/gcc/cp/decl.c w

c++: Fixup some vardecls and whitespace

2020-11-02 Thread Nathan Sidwell
Move some var decls to their initializers. Correct some whitespace. gcc/cp/ * decl.c (start_decl_1): Refactor declarations. Fixup some whitespace. (lookup_and_check_tag): Fixup some whitespace. pushing to trunk nathan -- Nathan Sidwell diff --git i/gcc/cp

libcpp: dependency emission tidying

2020-11-03 Thread Nathan Sidwell
rding them. (gfc_cpp_init): Likewise for target. pushing to trunk -- Nathan Sidwell diff --git c/gcc/c-family/c.opt w/gcc/c-family/c.opt index 10e53ea67c9..426636be839 100644 --- c/gcc/c-family/c.opt +++ w/gcc/c-family/c.opt @@ -242,11 +242,11 @@ Generate phony targets for all headers.

c++: rtti cleanups

2020-11-03 Thread Nathan Sidwell
... (get_tinfo_decl_direct): ... here. (build_dynamic_cast_1): Move var decls to their initializers. (tinfo_base_init): Set decl's location to BUILTINS_LOCATION. (get_tinfo_desc): Only push ABI namespace when needed. Set type's context. pushing to trunk -- Nathan Si

c++: cp_tree_equal cleanups

2020-11-03 Thread Nathan Sidwell
: Refactor CALL_EXPR. Use comp_template_args for TREE_VECs. pushing to trunk -- Nathan Sidwell diff --git i/gcc/cp/tree.c w/gcc/cp/tree.c index 9bc37aca95b..3087c4ab52c 100644 --- i/gcc/cp/tree.c +++ w/gcc/cp/tree.c @@ -2700,6 +2700,7 @@ bind_template_template_parm (tree t, tree newa

Re: libcpp: dependency emission tidying

2020-11-03 Thread Nathan Sidwell
Whoops, that broke bootstrap. Pushing this fix. libcpp/ * init.c (cpp_read_main_file): Use cpp_get_deps result. -- Nathan Sidwell diff --git c/libcpp/init.c w/libcpp/init.c index 5b2607e3767..6c52f50de39 100644 --- c/libcpp/init.c +++ w/libcpp/init.c @@ -669,7

cpplib: Fix off-by-one error

2020-11-03 Thread Nathan Sidwell
I noticed a fencepost error in the preprocessor. We should be checking if the next char is at the limit, not the current char (which can't be, because we're looking at it). libcpp/ * lex.c (_cpp_clean_line): Fix DOS off-by-one error. pushing to trunk -- Nathan Si

c++: Make extern-C mismatch an error

2020-11-03 Thread Nathan Sidwell
cc/cp/ * decl.c (duplicate_decls): Return error_mark_node fo extern-c mismatch. pushing to trunk -- Nathan Sidwell diff --git i/gcc/cp/decl.c w/gcc/cp/decl.c index 114e8d0cb01..9428fa05258 100644 --- i/gcc/cp/decl.c +++ w/gcc/cp/decl.c @@ -1776,7 +1776,7 @@ duplicate_decls (tree ne

c++: A couple of template instantiation cleanups

2020-11-03 Thread Nathan Sidwell
-scope handling to match the non-template case. (instantiate_body): Move a couple of declarations to their initializers. pushing to trunk -- Nathan Sidwell diff --git i/gcc/cp/pt.c w/gcc/cp/pt.c index aa162d2a4f9..2041b5635f0 100644 --- i/gcc/cp/pt.c +++ w/gcc/cp/pt.c

c++: Directly fixup deferred eh-specs

2020-11-03 Thread Nathan Sidwell
n_opt): ... here. Refactor the deferred parse. * tree.c (fixup_deferred_exception_variants): New. pushing to trunk -- Nathan Sidwell diff --git i/gcc/cp/cp-tree.h w/gcc/cp/cp-tree.h index 334424770ef..26852f6f2e3 100644 --- i/gcc/cp/cp-tree.h +++ w/gcc/cp/cp-tree.h @@ -7360,6 +7360,7 @@ e

cpplib: EOF in pragmas

2020-11-03 Thread Nathan Sidwell
in pragma when setting need_line, not when needing a line. pushing to trunk -- Nathan Sidwell diff --git i/libcpp/lex.c w/libcpp/lex.c index fb222924c8c..8283c4e4a19 100644 --- i/libcpp/lex.c +++ w/libcpp/lex.c @@ -2554,6 +2554,15 @@ cpp_peek_token (cpp_reader *pfile, int index) index

c++: Small pt.c cleanups

2020-11-03 Thread Nathan Sidwell
. (tsubst_template_decl): Check for FUNCTION_DECL, not !TYPE && !VAR for registering a specialization. pushing to trunk -- Nathan Sidwell diff --git i/gcc/cp/pt.c w/gcc/cp/pt.c index f1c8c0913ec..388423ba143 100644 --- i/gcc/cp/pt.c +++ w/gcc/cp/pt.c @@ -3634,7

c++: Refactor clone copying

2020-11-03 Thread Nathan Sidwell
ng to trunk nathan -- Nathan Sidwell diff --git i/gcc/cp/class.c w/gcc/cp/class.c index 6c21682a3e5..c03737294eb 100644 --- i/gcc/cp/class.c +++ w/gcc/cp/class.c @@ -4838,7 +4838,10 @@ copy_fndecl_with_name (tree fn, tree name, tree_code code, /* Create the RTL for this function. */ SET_DEC

c++: using-decl instantiation

2020-11-03 Thread Nathan Sidwell
e instantiation machinery. gcc/cp/ * pt.c (tsubst_expr): Simplify using decl instantiation, add asserts. pushing to trunk -- Nathan Sidwell diff --git i/gcc/cp/pt.c w/gcc/cp/pt.c index aa162d2a4f9..117fc13afb9 100644 --- i/gcc/cp/pt.c +++ w/gcc/cp/pt.c @@ -18059,11 +18059,18 @@ tsub

Re: [02/33] linemaps

2020-11-03 Thread Nathan Sidwell
Location handling needs to add 2 things 1) a new kind of inclusion -- namely a module. We add LC_MODULE as a map kind, 2) the ability to allocate blocks of line-maps for both ordinary locations and macro locations, that are then filled in by the module loader. -- Nathan Sidwell diff --git

Re: [09/33] core diagnostics

2020-11-03 Thread Nathan Sidwell
Here are the changes for gcc/configure.ac (config.h.in and configure get rebuilt). This is adding smarts to check for networking features, so that a network-aware module mapper can be built. -- Nathan Sidwell diff --git c/gcc/configure.ac w/gcc/configure.ac index 73034bb902b..168a3bc3625

[00/32] C++ 20 Modules

2020-11-03 Thread Nathan Sidwell
f today :) But don't forget to vote. nathan -- Nathan Sidwell

[05/32] cpp files

2020-11-03 Thread Nathan Sidwell
h so INCLUDE_NEXT works. nathan -- Nathan Sidwell diff --git c/libcpp/include/cpplib.h w/libcpp/include/cpplib.h index 8e398863cf6..81be6457951 100644 --- c/libcpp/include/cpplib.h +++ w/libcpp/include/cpplib.h @@ -971,6 +1002,9 @@ extern cpp_callbacks *cpp_get_callbacks (cpp_reader *) ATTRIBUTE

[02/32] linemaps

2020-11-03 Thread Nathan Sidwell
Location handling needs to add 2 things 1) a new kind of inclusion -- namely a module. We add LC_MODULE as a map kind, 2) the ability to allocate blocks of line-maps for both ordinary locations and macro locations, that are then filled in by the module loader. -- Nathan Sidwell diff

[01/32] langhooks

2020-11-03 Thread Nathan Sidwell
observe the token stream in order to load up the macro tables of header units. c-family's c-lex.c, c-opts.c & c-ppoutput.c get to call these hooks in various cases -- Nathan Sidwell diff --git c/gcc/c-family/c-lex.c w/gcc/c-family/c-lex.c index e81e16ddc26..44575473719 100644 --- c/gcc/c

[03/32] cpp-callbacks

2020-11-03 Thread Nathan Sidwell
Here are the callbacks in the preprocessor itself. a) one to handle deferred macros b) one to handle include translation. For every '#include ', there is the possibility of replacing that with 'import '. This hook determines if that happens. -- Nathan Sidwell diff --

[04/32] cpp lexer

2020-11-03 Thread Nathan Sidwell
cessfully peeked, we replace the identifiers with internal-only tokens that the c++ parser recognizes. -- Nathan Sidwell diff --git c/libcpp/include/cpplib.h w/libcpp/include/cpplib.h index 8e398863cf6..81be6457951 100644 --- c/libcpp/include/cpplib.h +++ w/libcpp/include/cpplib.h @@ -487,6 +494,9 @

[07/32] cpp main

2020-11-03 Thread Nathan Sidwell
h the main file starts is helpful for whole-file diagnostics. -- Nathan Sidwell diff --git c/libcpp/include/cpplib.h w/libcpp/include/cpplib.h index 8e398863cf6..81be6457951 100644 --- c/libcpp/include/cpplib.h +++ w/libcpp/include/cpplib.h @@ -308,6 +308,13 @@ enum cpp_normalize_level {

[06/32] cpp macros

2020-11-03 Thread Nathan Sidwell
epared to handle 'not a macro after all' -- Nathan Sidwell diff --git c/libcpp/directives.c w/libcpp/directives.c index d7b59aae901..899ebbf023a 100644 --- c/libcpp/directives.c +++ w/libcpp/directives.c @@ -667,7 +667,8 @@ do_undef (cpp_reader *pfile) pfile

[08/32] cpp mkdeps

2020-11-03 Thread Nathan Sidwell
this when demonstrating a module-aware Make POC. -- Nathan Sidwell diff --git c/libcpp/include/mkdeps.h w/libcpp/include/mkdeps.h index 6d05351cb4a..1d6dd9562a5 100644 --- c/libcpp/include/mkdeps.h +++ w/libcpp/include/mkdeps.h @@ -55,9 +57,12 @@ extern void deps_add_default_target (class m

[11/32] instrumentation

2020-11-03 Thread Nathan Sidwell
I add one new parameter -- the number of concurrently open module files, and 3 instrumentation timers. -- Nathan Sidwell diff --git c/gcc/params.opt w/gcc/params.opt index 7bac39a9d58..0366584f94e 100644 --- c/gcc/params.opt +++ w/gcc/params.opt @@ -349,6 +349,10 @@ Maximal stack frame growth

[09/32] core diagnostics

2020-11-03 Thread Nathan Sidwell
The 'included from ...' chain that one gets at the start of a diagnostic needs extending to include importing. There are a few combinations to handle, but nothing particularly exciting. -- Nathan Sidwell diff --git c/gcc/diagnostic.c w/gcc/diagnostic.c index 1b6c9845892..52bf5e0d

[18/32] new C++ template bits

2020-11-03 Thread Nathan Sidwell
We also need to manipulate the instantiation tables. This exposes that bit of the template machinery. (other patches address instantiations themselves) -- Nathan Sidwell diff --git c/gcc/cp/cp-tree.h w/gcc/cp/cp-tree.h index fdb8ee57f0b..e8e4d0af2d8 100644 --- c/gcc/cp/cp-tree.h +++ w/gcc

[12/32] user documentation

2020-11-03 Thread Nathan Sidwell
This is the user documentation. -- Nathan Sidwell diff --git c/gcc/doc/invoke.texi w/gcc/doc/invoke.texi index 492b7dcdf10..3fdee8bbd3b 100644 --- c/gcc/doc/invoke.texi +++ w/gcc/doc/invoke.texi @@ -97,7 +97,7 @@ The usual way to run GCC is to run the executable called @command{gcc}, or When

[17/32] new C++ constexpr bits

2020-11-03 Thread Nathan Sidwell
We need to load and save constexpr bodies. This exposes that hash table from constexpr -- Nathan Sidwell diff --git c/gcc/cp/cp-tree.h w/gcc/cp/cp-tree.h index fdb8ee57f0b..e8e4d0af2d8 100644 --- c/gcc/cp/cp-tree.h +++ w/gcc/cp/cp-tree.h @@ -7862,9 +8177,20 @@ extern void

[16/32] new C++ infrastructure

2020-11-03 Thread Nathan Sidwell
s also has some pieces handling parameter packs as structurally-compared types. IIRC when we fixed some of that in the GCC10 release, we tried to handle them as not-types. I never addressed that on the modules branch. nathan -- Nathan Sidwell diff --git c/gcc/cp/cp-tree.h w/gcc/cp/

[14/32] new keywords

2020-11-03 Thread Nathan Sidwell
sor output. -- Nathan Sidwell diff --git c/gcc/c-family/c-common.c w/gcc/c-family/c-common.c index d56238aeb01..33d6ad73125 100644 --- c/gcc/c-family/c-common.c +++ w/gcc/c-family/c-common.c @@ -540,6 +540,12 @@ const struct c_common_resword c_common_reswords[] = { "concept

[13/32] new options

2020-11-03 Thread Nathan Sidwell
ether. There is a potential issue down the road when we implicitly enable modules. At that point building a header-unit could become indistinguishable from building a PCH. Perhaps we should consider phasing in an explicit PCH option? -- Nathan Sidwell diff --git c/gcc/c-family/c-opts.c w/gcc/c-f

[15/32] new C++ lexer

2020-11-03 Thread Nathan Sidwell
recognition. It is used both for C++ parsing proper and for just preprocessing. When a module-significant control line is observed, we call into the module machinery to handle it. Usually, we'll also call again later when parsing that declaration. -- Nathan Sidwell diff --git c/gcc/cp/le

[19/32] global trees

2020-11-03 Thread Nathan Sidwell
We directly reference global trees, and expect them to be immutable. This reorders the global tree arrays, moving the mutable ones after a High Water Mark. Those after the HWM are not directly accessed in the module machinery (we'll reference by name or equivalent). -- Nathan Sidwell

[21/32] miscelaneous

2020-11-03 Thread Nathan Sidwell
These are changes to gcc/tree.h adding some raw accessors to nodes, which seemed preferable to direct field access. I also needed access to the integral constant cache -- Nathan Sidwell diff --git c/gcc/tree.h w/gcc/tree.h index 7f0aa5b8d1d..13062f52919 100644 --- c/gcc/tree.h +++ w/gcc

[20/32] global constructor

2020-11-03 Thread Nathan Sidwell
changes to the global ctor emission. -- Nathan Sidwell diff --git c/gcc/cp/decl2.c w/gcc/cp/decl2.c index 71107e03010..60bc6444d7c 100644 --- c/gcc/cp/decl2.c +++ w/gcc/cp/decl2.c @@ -3636,35 +3636,45 @@ generate_tls_wrapper (tree fn) static tree start_objects (int method_type, int initp

[22/32] miscelaneous c++ bits

2020-11-03 Thread Nathan Sidwell
but for templates they can of course be different. -- Nathan Sidwell diff --git c/gcc/cp/cp-tree.def w/gcc/cp/cp-tree.def index a188576013b..ba02cdc2748 100644 --- c/gcc/cp/cp-tree.def +++ w/gcc/cp/cp-tree.def @@ -233,6 +233,9 @@ DEFTREECODE (TEMPLATE_ID_EXPR, "template_id_expr",

[26/33] name-lookup

2020-11-03 Thread Nathan Sidwell
This is the name-lookup changes. Namespace-scope name-lookup now has to contend with merging the bindings from multiple visible modules, and ensuring said bindings are loaded (we load them lazily) nathan -- Nathan Sidwell diff --git c/gcc/cp/name-lookup.c w/gcc/cp/name-lookup.c index

[24/32] module mapper

2020-11-03 Thread Nathan Sidwell
server over a) a pipe to a spawned process's stdin/stdout b) a pair of specified filenos c) a unix-domain socket (if supported) d) an ipv6 host/port (if supported) the server can operat in modes a, c or d. -- Nathan Sidwell diff --git c/gcc/cp/mapper-client.cc w/gcc/cp/mapper-client.cc new

[28/32] lang hook implementation

2020-11-03 Thread Nathan Sidwell
This implements the C++ overides of the langhooks I introduced. -- Nathan Sidwell diff --git c/gcc/cp/cp-lang.c w/gcc/cp/cp-lang.c index 9e980bc6de9..d75fa8ab708 100644 --- c/gcc/cp/cp-lang.c +++ w/gcc/cp/cp-lang.c @@ -77,6 +77,16 @@ static tree cxx_enum_underlying_base_type (const_tree

[27/32] parser

2020-11-03 Thread Nathan Sidwell
definition when an existing definition is already know via (header-unit) import. You'll get a multiple-definition error. nathan -- Nathan Sidwell diff --git c/gcc/cp/parser.c w/gcc/cp/parser.c index dd8c4b56bd0..98ca9aae082 100644 --- c/gcc/cp/parser.c +++ w/gcc/cp/parser.c @@ -646,9 +6

[29/32] make-lang.in

2020-11-03 Thread Nathan Sidwell
load modules when the MODULE_VERSION is not on the same day (there's an override flag). I'm not sure if we should continue putting the version into REVISION, particularly for non-experimental builds. nathan -- Nathan Sidwell diff --git c/gcc/cp/Make-lang.in w/gcc/cp/Make-lang.in in

[30/32] test harness

2020-11-03 Thread Nathan Sidwell
Here's the test harness change, adding a few more prune cases. -- Nathan Sidwell diff --git c/gcc/testsuite/lib/prune.exp w/gcc/testsuite/lib/prune.exp index 190367c44e0..5d051b99def 100644 --- c/gcc/testsuite/lib/prune.exp +++ w/gcc/testsuite/lib/prune.exp @@ -48,7 +48,11 @@

[32/32] fixinclude

2020-11-03 Thread Nathan Sidwell
AIX needed a fixinclude. It contained typedef struct {...} *ptr; that's an ODR landmine. Fixed by giving the struct a name nathan -- Nathan Sidwell diff --git c/fixincludes/fixincl.x w/fixincludes/fixincl.x index 758d5620641..21439652bce 100644 --- c/fixincludes/fixincl.x +++ w/fixinc

[31/32] test suite

2020-11-03 Thread Nathan Sidwell
Here's the testsuite, a new g++.dg/modules directory I don't think this'll work with cross-testing -- Nathan Sidwell 31-testsuite.diff.gz Description: application/gzip

Re: [04/32] cpp lexer

2020-11-03 Thread Nathan Sidwell
On 11/3/20 6:08 PM, Joseph Myers wrote: On Tue, 3 Nov 2020, Nathan Sidwell wrote: @@ -888,9 +915,9 @@ struct GTY(()) cpp_hashnode { unsigned int directive_index : 7; /* If is_directive, then index into directive table

Re: [00/32] C++ 20 Modules

2020-11-04 Thread Nathan Sidwell
On 11/3/20 10:14 PM, Hans-Peter Nilsson wrote: On Tue, 3 Nov 2020, Nathan Sidwell wrote: I have bootstrapped and tested on: x86_64-linux aarch64-linux powerpc8le-linux powerpc8-aix Iain Sandoe has been regularly bootstrapping on x86_64-darwin. Joseph Myers graciously built for i686-mingw

Re: [00/32] C++ 20 Modules

2020-11-04 Thread Nathan Sidwell
On 11/4/20 7:30 AM, Nathan Sidwell wrote: rechecking the compile-farm page, I see gcc45 is a 686 machine, I'll try that. yeah, that didn't work. There's compilation errors in ../../../src/gcc/config/i386/x86-tune-costs.h about missing initializers. and then ... In fil

Re: [00/32] C++ 20 Modules

2020-11-04 Thread Nathan Sidwell
On 11/4/20 9:15 AM, Jason Merrill wrote: On Wed, Nov 4, 2020 at 8:50 AM Nathan Sidwell <mailto:nat...@acm.org>> wrote: We can; apparently the necessary incantation is to #define INCLUDE_ALGORITHM thanks that's fixed the build problem. And working around the i386 error I

[10/32] config

2020-11-04 Thread Nathan Sidwell
I managed to flub sending this yesterday. This is the gcc/configure.ac changes (rebuild configure and config.h.in after applying). Generally just checking for network-related functionality. If it's not available, those features of the module mapper will be unavailable. nathan -- N

Re: [00/32] C++ 20 Modules

2020-11-05 Thread Nathan Sidwell
-module-mapper configure option seems sensible. nathan -- Nathan Sidwell

Re: [00/32] C++ 20 Modules

2020-11-05 Thread Nathan Sidwell
d points in the file system. The location of the repo is entirely under the mapper-server's control. Set it to / if you want. nathan -- Nathan Sidwell

c++: Parser tweaks

2020-11-06 Thread Nathan Sidwell
/ * parser.c (cp_parser_template_declaration): Adjust 'export' warning. (cp_parser_explicit_specialization): Remove unneeded bool setting. pushing to trunk -- Nathan Sidwell diff --git i/gcc/cp/parser.c w/gcc/cp/parser.c index e7bfbf649a5..c948dc9d050 100644 --- i/gcc/cp/

libcpp: Provide date routine

2020-11-06 Thread Nathan Sidwell
ate_reader): Initialize them. * macro.c (_cpp_builtin_macro_text): Use cpp_get_date. (cpp_get_date): Broken out from _cpp_builtin_macro_text and genericized. pushing to trunk nathan -- Nathan Sidwell diff --git i/libcpp/include/cpplib.h w/libcpp/include/cpplib.h index 8e398863cf6..c

Re: [21/32] miscelaneous

2020-11-06 Thread Nathan Sidwell
On 11/5/20 8:30 AM, Richard Biener wrote: On Tue, Nov 3, 2020 at 10:16 PM Nathan Sidwell wrote: These are changes to gcc/tree.h adding some raw accessors to nodes, which seemed preferable to direct field access. I also needed access to the integral constant cache can you please document

Re: [10/32] config

2020-11-06 Thread Nathan Sidwell
On 11/6/20 12:56 PM, Jeff Law wrote: On 11/4/20 12:24 PM, Nathan Sidwell wrote: I managed to flub sending this yesterday. This is the gcc/configure.ac changes (rebuild configure and config.h.in after applying).  Generally just checking for network-related functionality.  If it's not avai

c++: Consistently expose singleton overloads

2020-11-06 Thread Nathan Sidwell
(lookup_qualified_name): Expose an overload of a singleton with known type. (lookup_name_1): Just check the overload's type to expose it. * parser.c (cp_parser_lookup_name): Do not do that check here. pushing to trunk nathan -- Nathan Sidwell diff --git i/gcc/cp/name-looku

Re: [04/32] cpp lexer

2020-11-06 Thread Nathan Sidwell
t pragma_allow_expansion or directive_line. Hm, yeah. I think neither of those fields have any bearing in non-directives mode, and always get set when entering it? Again, comment at the very least. nathan -- Nathan Sidwell

<    1   2   3   4   5   6   7   8   9   10   >