Ping:
https://gcc.gnu.org/ml/gcc-patches/2017-05/msg00321.html
On Thu, 2017-05-04 at 12:36 -0400, David Malcolm wrote:
> As of r247522, fix-it-hints can suggest the insertion of new lines.
>
> This patch uses this to implement a new "maybe_add_include_fixit"
> function
.html
[PATCH 3/3] C: hints for missing stdlib includes for macros and types
https://gcc.gnu.org/ml/gcc-patches/2017-05/msg00438.html
On Fri, 2017-05-05 at 13:51 -0400, David Malcolm wrote:
> In various places we use lookup_name_fuzzy to provide a hint,
> and can report messages
Ping:
https://gcc.gnu.org/ml/gcc-patches/2017-05/msg00334.html
On Thu, 2017-05-04 at 14:16 -0400, David Malcolm wrote:
> As of r247522, fix-it-hints can suggest the insertion of new lines.
>
> This patch updates -Wimplicit-fallthrough to provide suggestions
> with fix-it hints,
On Wed, 2017-05-10 at 09:34 -0400, Nathan Sidwell wrote:
> On 05/09/2017 09:41 PM, David Malcolm wrote:
> > On Tue, 2017-05-09 at 10:52 -0400, Nathan Sidwell wrote:
>
> > I split out the non-c++ bits into a separate patch.
> >
> > v3 of the patch kit is thus thr
On Thu, 2017-06-01 at 18:45 +0200, Marek Polacek wrote:
> A motivating example for this warning can be found e.g. in
>
> PRE10-C. Wrap multistatement macros in a do-while loop
> https://www.securecoding.cert.org/confluence/x/jgL7
>
> i.e.,
>
> #define SWAP(x, y) \
> tmp = x; \
> x = y;
Dominique noted on IRC that the new test show-template-tree-color.C
(r248698) fails when GCC_COLORS is set in the environment.
The following patch unsets GCC_COLORS within gcc-dg.exp,
fixing this issue.
Successfully regrtested on x86_64-pc-linux-gnu; I also verified
the fix of the failing test by
r248336 added these lines to free_growth_caches
if (edge_removal_hook_holder)
symtab->remove_edge_removal_hook (edge_removal_hook_holder);
which broke the JIT; attempts to compile more than one time
within a single process segfault here:
305 symbol_table::remove_edge_removal_hook (cgra
On Tue, 2017-05-02 at 08:05 +0200, Volker Reichelt wrote:
> Hi,
>
> the following patch fixes two typos in error messages of the C++
> parser
> (which have gone unnoticed since GCC 3.4.0).
>
> Bootstrapped and regtested on x86_64-pc-linux-gnu.
> OK for trunk?
> Should this go also to GCC 7.2?
>
Ping re this patch:
https://gcc.gnu.org/ml/gcc-patches/2017-05/msg00204.html
On Fri, 2017-05-26 at 15:35 -0400, David Malcolm wrote:
> On Wed, 2017-05-03 at 09:51 -0400, David Malcolm wrote:
> > On Thu, 2017-04-27 at 23:03 +0200, Marek Polacek wrote:
> > > On Thu, Apr 27,
PR 62170 describes a problem with how the quoting in pp_format
interacts with the "aka" information for typedefs in %qT for
the C family of frontends, and also now for %qH and %qI in the
C++ frontend.
Currently for %qT we print e.g.:
‘Py_ssize_t* {aka int*}’
^^ colorized
On Fri, 2017-05-12 at 12:47 -0600, Jeff Law wrote:
> On 05/02/2017 01:08 PM, David Malcolm wrote:
> > Currently the C/C++ frontends discard comments when parsing.
> > It's possible to set up libcpp to capture comments as tokens,
> > by setting CPP_OPTION (pfile,
In r240391 Jakub added relative line number notation (.+4 or .-1 etc)
for DejaGnu messages.
This patch tweaks the regex to allow relative line numbers containing
more than one digit (I ran into this with a test for a diagnostic
that issues multiple notes, for which I wanted to verify the
diagnosti
Ping:
https://gcc.gnu.org/ml/gcc-patches/2016-12/msg01616.html
(the patch has been successfully bootstrap®rtested on
x86_64-pc-linux-gnu, and also tested on i686-pc-linux-gnu).
On Mon, 2016-12-19 at 12:12 -0500, David Malcolm wrote:
> Note to i386 maintainters: this patch is part of the
PR c++/77829 and PR c++/78656 identify an issue within the C++ frontend
where it issues nonsensical fix-it hints for misspelled name lookups
within an explicitly given namespace: it finds the closest name within
all namespaces, and uses the location of the namespace for the replacement,
rather than
On Wed, 2017-01-04 at 00:01 +0100, Jakub Jelinek wrote:
> Hi!
>
> The cb.error hook is called in the case we are looking for with
> _("conversion from %s to %s not supported by iconv")
> where _(msgid) is dgettext ("cpplib", msgid), so if performing -fself
> -test
> on iconv that doesn't support e
On Wed, 2017-01-04 at 09:04 -0700, Jeff Law wrote:
> On 01/04/2017 06:42 AM, Jason Merrill wrote:
> > On Wed, Jan 4, 2017 at 8:13 AM, Alexandre Oliva
> > wrote:
> > > On Jan 3, 2017, Jason Merrill wrote:
> > >
> > > > Are there bugzillas for these false positive warnings?
> > >
> > > I don't t
On Thu, 2017-01-05 at 10:43 +0100, Uros Bizjak wrote:
> On Tue, Jan 3, 2017 at 5:47 PM, David Malcolm
> wrote:
> > Ping:
> > https://gcc.gnu.org/ml/gcc-patches/2016-12/msg01616.html
> >
> > (the patch has been successfully bootstrap®rtested on
> > x86_64-p
The GIMPLE frontend's pass-skipping logic in execute_one_pass is somewhat
awkward. This patch splits it out into two subroutines to simplify
things.
No functional change intended (and this may make it easier to
update the logic so that it can be shared with the RTL frontend).
Successfully bootst
On Fri, 2017-01-06 at 17:25 +0100, Jakub Jelinek wrote:
> On Thu, Jan 05, 2017 at 03:20:26PM -0500, David Malcolm wrote:
> > + /* Handle "reuse_rtx". */
> > + if (strcmp (code_name, "reuse_rtx") == 0)
> > +{
> > + read_name (
On Fri, 2017-01-06 at 10:25 -0700, Jeff Law wrote:
> On 01/06/2017 09:43 AM, David Malcolm wrote:
> > On Fri, 2017-01-06 at 17:25 +0100, Jakub Jelinek wrote:
> > > On Thu, Jan 05, 2017 at 03:20:26PM -0500, David Malcolm wrote:
> > > > + /* Handle "reuse_rtx&quo
PR c++/72803 describes an issue where a fix-it hint is to be emitted at
column 512 of a 511-column source line, leading to an ICE.
The root cause is a bug in linemap_line_start, when transitioning from
lines >= 512 in width to narrow lines.
The wide line in the reproducer has a line map with:
m
This part of the patch adds the ability to tag a function with
"__RTL", analogous to the "__GIMPLE" tag.
gcc/c-family/ChangeLog:
* c-common.c (c_common_reswords): Add "__RTL".
* c-common.h (enum rid): Add RID_RTL.
gcc/c/ChangeLog:
* c-parser.c: Include "read-rtl-function.h
gcc/ChangeLog:
* cfg.c (original_copy_tables_initialized_p): New function.
* cfg.h (original_copy_tables_initialized_p): New decl.
* cfgrtl.c (relink_block_chain): Guard the call to
free_original_copy_tables with a call to
original_copy_tables_initialized_p.
it, rather than having
the callgraph control this.
Successfully bootstrapped®rtested on x86_64-pc-linux-gnu;
v7 was successfully built for 191 target configurations.
David Malcolm (10):
Add "__RTL" to C frontend
Don't assume that copy tables were initialized
callgraph: handle
The RTL backend code is full of singleton state, so we have to handle
functions as soon as we parse them. This requires various special-casing
in the callgraph code.
gcc/ChangeLog:
* cgraph.h (symtab_node::native_rtl_p): New decl.
* cgraphunit.c (symtab_node::native_rtl_p): New fu
gcc/testsuite/ChangeLog:
* gcc.dg/rtl/aarch64/asr_div1.c: New test case.
* gcc.dg/rtl/aarch64/pr71779.c: New test case.
---
gcc/testsuite/gcc.dg/rtl/aarch64/asr_div1.c | 41 +++
gcc/testsuite/gcc.dg/rtl/aarch64/pr71779.c | 50 +
2 fi
gcc/ChangeLog:
* passes.c: Include "insn-addr.h".
(should_skip_pass_p): Add logging. Update logic for running
"expand" to be compatible with both __GIMPLE and __RTL. Guard
property-provider override so it is only done for gimple passes.
Don't skip dfinit.
gcc/ChangeLog:
* read-md.c (md_reader::read_char): Support filtering
the input to a subset of line numbers.
(md_reader::md_reader): Initialize fields
m_first_line and m_last_line.
(md_reader::read_file_fragment): New function.
* read-md.h (md_reader::
gcc/ChangeLog:
* final.c (rest_of_clean_state): Don't call delete_tree_ssa for
__RTL functions.
---
gcc/final.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gcc/final.c b/gcc/final.c
index 8a4c9f8..2483381 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -4699
This patch adds:
- an rtl.exp (to make it easy to run just the tests
for __RTL-tagged functions)
- a test.c source file I used when generating the various RTL
dumps (for reference)
- a couple of tests of __RTL parser errors
gcc/testsuite/ChangeLog:
* gcc.dg/rtl/rtl.exp: New file.
The backend is full of singleton state, so we have to compile
__RTL-functions as soon as we parse them. This means that the
C frontend needs to invoke the backed.
This patch adds the support needed.
Normally this would be a no-no, and including rtl headers is
blocked by this within system.h:
/
A collection of test cases, capturing the state of various
functions at various places within the pass list, and verifying
that we can restart at various passes.
gcc/testsuite/ChangeLog:
* gcc.dg/rtl/x86_64/dfinit.c: New test case.
* gcc.dg/rtl/x86_64/different-structs.c: New test
PR driver/78877 notes that we offer a suggestion for
"-fsanitize-addres" (with a hyphen):
xgcc: error: unrecognized command line option '-fsanitize-addres';
did you mean '-fsanitize=address'?
but not for "-fsanitize=addres" (with an equals sign):
xgcc: error: unrecognized argument to -fsan
PR c++/77949 identifies an ICE when the C++ frontend attempts to emit a
fix-it hint inserting a missing semicolon at column 4097 of a source file.
This column value exceeds LINE_MAP_MAX_COLUMN_NUMBER and hence isn't
representable using a location_t.
Attempting to do so leads to these problems, wh
On Tue, 2017-01-10 at 20:49 +0100, Jakub Jelinek wrote:
> On Tue, Jan 10, 2017 at 03:02:49PM -0500, David Malcolm wrote:
> > +/* Given ARG, an unrecognized sanitizer option, return the best
> > + matching sanitizer option, or NULL if there isn't one. */
> >
c-lex.c: lex_string uses cpp_get_token rather than
cpp_get_token_with_location, and hence the C family of frontends
record the physical locations of tokens in string concatenations, rather
than the virtual locations, discarding any macro expansion information.
The resulting *tree* node from the co
This patch poisons strndup (in system.h), as requested in the
discussion of PR bootstrap/78616.
Successfully bootstrapped®rtested on x86_64-pc-linux-gnu.
OK for trunk?
gcc/ChangeLog:
PR bootstrap/78616
* system.h: Poison strndup.
---
gcc/system.h | 3 ++-
1 file changed, 2 inser
On Wed, 2017-01-04 at 14:58 -0500, Jason Merrill wrote:
> On Tue, Jan 3, 2017 at 8:28 PM, David Malcolm
> wrote:
> > PR c++/77829 and PR c++/78656 identify an issue within the C++
> > frontend
> > where it issues nonsensical fix-it hints for misspelled name
> > lo
On Mon, 2017-01-16 at 13:31 +0100, Rainer Orth wrote:
> Hi Christophe,
>
> > > Successfully bootstrapped®rtested on x86_64-pc-linux-gnu;
> > > adds 34 PASS results to gcc.sum.
> > >
> > These 2 tests fail on arm:
> >
> > gcc.dg/format/pr78304.c (test for warnings, line 9)
> > gcc.dg/form
On Mon, 2017-01-16 at 15:04 -0700, Jeff Law wrote:
> On 01/09/2017 07:38 PM, David Malcolm wrote:
> > gcc/ChangeLog:
> > * read-md.c (md_reader::read_char): Support filtering
> > the input to a subset of line numbers.
> > (md_reader::md_reader): Initialize
On Mon, 2017-01-16 at 14:54 -0700, Jeff Law wrote:
> On 01/09/2017 07:38 PM, David Malcolm wrote:
> > The backend is full of singleton state, so we have to compile
> > __RTL-functions as soon as we parse them. This means that the
> > C frontend needs to invoke the backed.
>
Someone pointed out a grammar nit in the -Wmisleading-indentation
diagnostic messages, which this patch fixes.
Successfully bootstrapped®rtested on x86_64-pc-linux-gnu.
OK for trunk and for gcc 6?
gcc/c-family/ChangeLog:
PR c++/71497
* c-indentation.c (warn_for_misleading_indenta
On Tue, 2017-01-17 at 13:35 +0100, Jan Hubicka wrote:
> > On Mon, Jan 16, 2017 at 10:25 PM, Jeff Law wrote:
> > > On 01/09/2017 07:38 PM, David Malcolm wrote:
> > > >
> > > > The RTL backend code is full of singleton state, so we have to
> > > >
On Tue, 2017-01-17 at 10:28 +0100, Richard Biener wrote:
> On Mon, Jan 16, 2017 at 10:42 PM, Jeff Law wrote:
> > On 01/09/2017 07:38 PM, David Malcolm wrote:
> > >
> > > gcc/ChangeLog:
> > > * passes.c: Include "insn-addr.h".
> > >
On Tue, 2017-01-17 at 10:45 +0100, Christophe Lyon wrote:
> On 16 January 2017 at 19:50, David Malcolm
> wrote:
> > On Mon, 2017-01-16 at 13:31 +0100, Rainer Orth wrote:
> > > Hi Christophe,
> > >
> > > > > Successfully bootstrapped®rtested on x86_64
On Wed, 2017-01-18 at 09:36 -0700, Jeff Law wrote:
> On 01/17/2017 02:28 AM, Richard Biener wrote:
> > >
> > > This feels somewhat different, but still a hack.
> > >
> > > I don't have strong suggestions on how to approach this, but what
> > > we've got
> > > here feels like a hack and one prone
DejaGnu's provides decls of various inline functions,
of which the jit testsuite uses "pass", "fail" and "note".
The jit testcase test-threads.c jumps through some hoops to make
these functions threadsafe, using macros to rename the implementation
in dejagnu.h, giving them a "dejagnu_" prefix, th
The jit testcase test-nested-loops.c was crashing.
Root cause is that deep inside loop optimization we're now exposing
this call within fold-const.c which wasn't being hit before:
4082 /* Compute the mask to access the bitfield. */
4083 unsigned_type = lang_hooks.types.type_for_size (*
On Sat, 2017-01-14 at 09:50 -0500, Jason Merrill wrote:
> On Fri, Jan 13, 2017 at 5:05 PM, David Malcolm
> wrote:
> > On Wed, 2017-01-04 at 14:58 -0500, Jason Merrill wrote:
> > > On Tue, Jan 3, 2017 at 8:28 PM, David Malcolm <
> > > dmalc...@redhat.com>
> &
On Thu, 2017-01-19 at 10:36 +0100, Richard Biener wrote:
> On Wed, Jan 18, 2017 at 10:45 PM, David Malcolm
> wrote:
> > The jit testcase test-nested-loops.c was crashing.
> >
> > Root cause is that deep inside loop optimization we're now exposing
> > this ca
On Mon, 2017-01-16 at 14:42 -0700, Jeff Law wrote:
> On 01/09/2017 07:38 PM, David Malcolm wrote:
> > gcc/ChangeLog:
> > * passes.c: Include "insn-addr.h".
> > (should_skip_pass_p): Add logging. Update logic for running
> > "expand"
On Thu, 2017-01-19 at 13:15 -0500, Jason Merrill wrote:
> On Wed, Jan 18, 2017 at 5:29 PM, David Malcolm
> wrote:
> > Here's a version of the patch which simply tweaks
> > cp_parser_primary_expression's call to finish_id_expression so that
> > it passes the loc
On Fri, 2017-01-20 at 09:06 +0100, Richard Biener wrote:
> On Thu, Jan 19, 2017 at 6:22 PM, David Malcolm
> wrote:
> > On Mon, 2017-01-16 at 14:42 -0700, Jeff Law wrote:
> > > On 01/09/2017 07:38 PM, David Malcolm wrote:
> > > > gcc/ChangeLog:
> > &
On Fri, 2017-01-20 at 16:16 +0100, Richard Biener wrote:
[...]
> > Richi: if that patch is approved, are you OK with patch 9 in early
> > stage 4?
>
> Yes.
Thanks.
All of the various parts of patch 9 have now been approved.
I've rebased it, and merged the fixes identified in review.
Testing o
On Tue, 2017-01-24 at 13:52 +0100, Martin Jambor wrote:
> Hi,
>
> On Mon, Jan 23, 2017 at 02:11:37PM +0100, Richard Biener wrote:
> > On Mon, Jan 23, 2017 at 1:02 PM, Martin Jambor
> > wrote:
> > > Hi,
> > >
> > >
> > > On Mon, Jan 23, 2017 at 12:56:13PM +0100, Richard Biener wrote:
> > > > On
On Tue, 2017-01-24 at 15:30 -0500, David Malcolm wrote:
> On Tue, 2017-01-24 at 13:52 +0100, Martin Jambor wrote:
> > Hi,
> >
> > On Mon, Jan 23, 2017 at 02:11:37PM +0100, Richard Biener wrote:
> > > On Mon, Jan 23, 2017 at 1:02 PM, Martin J
The "internals" documentation has a "Testsuites" chapter; this patch
adds some notes to it, describing the __GIMPLE and __RTL extensions
to the C frontend.
Builds; passed visual inspection of .info, .html, .pdf. and .dvi.
OK for trunk?
gcc/ChangeLog:
* doc/sourcebuild.texi (Testsuites):
On Fri, 2017-03-24 at 14:10 -0400, Eric Gallager wrote:
> The attached test case failed with gcc 4.9 and older, but started
> compiling successfully with only the 1 expected warning with gcc 5.
> Adding it to the test suite would ensure that this behavior doesn't
> regress.
Thanks for posting thi
As noted in the PR, c.opt's description of -Wendif-labels erroneously
refers to #elif, rather than #else.
warn_endif_labels is used by:
libcpp/directives.c: do_else
libcpp/directives.c: do_endif
in which they use it to guard calls to check_eol_endif_labels.
It's not used by do_elif.
doc/cppw
As noted in the PR, the C++ frontend currently offers a poor
suggestion for this misspelling:
a.C: In function ???void f()???:
a.C:3:3: error: ???static_assertion??? was not declared in this scope
static_assertion (1 == 0, "1 == 0");
^~~~
a.C:3:3: note: suggested alternative: ???
On Thu, 2017-03-30 at 22:28 +0200, Florian Weimer wrote:
> * David Malcolm:
>
> > Here's a work-in-progress implementation of the idea, adding this
> > entrypoint to the API:
> >
> > extern gcc_jit_type *
> > gcc
On Thu, 2017-04-06 at 10:44 -0600, Jeff Law wrote:
> On 03/24/2017 03:29 AM, Martin Liška wrote:
> > I would like to ping that. I'm not sure what's agreement after I
> > read
> > discussion in: https://gcc.gnu.org/ml/gcc/2017-03/msg00070.html
> >
> > Martin Sebor may know, CC'ing him.
> Not sure i
On Fri, 2017-04-07 at 21:55 +0200, Volker Reichelt wrote:
> Hi,
>
> with the following patch I suggest to add a diagnostic for extra
> semicolons after in-class member function definitions:
>
> struct A
> {
> A() {};
> void foo() {};
> friend void bar() {};
> };
>
> Although th
On Sat, 2017-04-22 at 19:49 +0200, Tom de Vries wrote:
> Hi,
>
> there are currently two types of line number supported in
> dg-{error,warning,message,bogus} directives: absolute and relative.
> With an absolute line number, it's immediately clear what line number
> is
> meant, but when a line i
On Fri, 2017-04-21 at 18:01 +0200, Volker Reichelt wrote:
> Hi,
>
> the following patch adds fix-it info to error messages in 4 places
> where the C++ parser complains about duplicate tokens.
> The fix-it infos suggest to remove the duplicates.
>
> Bootstrapped and regtested on x86_64-pc-linux-gn
Ping for gcc 8.
On Fri, 2017-03-31 at 12:41 -0400, David Malcolm wrote:
> As noted in the PR, the C++ frontend currently offers a poor
> suggestion for this misspelling:
>
> a.C: In function ‘void f()’:
> a.C:3:3: error: ‘static_assertion’ was not declared in this scope
>s
If the user forgets to include an STL header, then an attempt
to use a class in an explicitly scoped "std::" currently leads to
this error:
test.cc:3:8: error: 'string' is not a member of 'std'
std::string s ("hello world");
^~
This patch attempts to make this error a bit more user
Patch adds a fix-it hint to a pre-existing pedwarn to make
it easier for IDEs to assist in fixing the mistake.
Successfully bootstrapped®rtested on x86_64-pc-linux-gnu.
OK for trunk?
gcc/c/ChangeLog:
* c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
hint for removing
Patch adds a fix-it hint to a pre-existing pedwarn to make
it easier for IDEs to assist in fixing the mistake.
Successfully bootstrapped®rtested on x86_64-pc-linux-gnu.
OK for trunk?
gcc/cp/ChangeLog:
* parser.c (cp_parser_member_declaration): Add fix-it hint
for removing stray s
Given e.g.
class foo
{
public:
int get_field () const { return m_field; }
private:
int m_field;
};
...if the user attempts to access the private field from the
wrong place we emit:
test.cc: In function ‘int test(foo*)’:
test.cc:12:13: error: ‘int foo::m_field’ is private
On Mon, 2017-04-24 at 11:20 -0400, David Malcolm wrote:
> On Sat, 2017-04-22 at 19:49 +0200, Tom de Vries wrote:
> > Hi,
> >
> > there are currently two types of line number supported in
> > dg-{error,warning,message,bogus} directives: absolute and relative.
> > W
On Fri, 2017-03-31 at 17:13 -0400, David Malcolm wrote:
> On Thu, 2017-03-30 at 22:28 +0200, Florian Weimer wrote:
> > * David Malcolm:
> >
> > > Here's a work-in-progress implementation of the idea, adding this
> > > entrypoint to the A
On Tue, 2017-04-25 at 06:59 -0700, Steve Kargl wrote:
> Someone (other than Richard who seems to have fixed his
> bootstrap issue) in the last 3 days has broken bootstrap
> on FreeBSD. The generated file gcc/options.h contains
> code of the form
>
> OPT_C = 116, /*
On Tue, 2017-04-25 at 07:49 -0400, Nathan Sidwell wrote:
> On 04/25/2017 07:46 AM, Nathan Sidwell wrote:
> > On 04/24/2017 04:06 PM, David Malcolm wrote:
> >
> > > test.cc:12:13: note: field ‘int foo::m_field’ can be accessed via
> > > ‘int
> > >
On Tue, 2017-04-25 at 12:11 -0400, Nathan Sidwell wrote:
> On 04/25/2017 11:58 AM, David Malcolm wrote:
>
> >{ return FIELD; }
> >
> > for the correct field, favoring returning T to returning T&.
>
> Hm, that seems the poorer choice (unless you can sug
On Wed, 2017-04-26 at 14:02 +0200, Volker Reichelt wrote:
> Hi,
>
> the following patch adds fix-it information for a diagnostic in the
> C++
> parser: Use a scope operator instead of a single colon in a
> nested-name-specifier.
>
> Bootstrapped and regtested on x86_64-pc-linux-gnu.
>
> OK for t
On Tue, 2017-04-25 at 18:22 -0400, Nathan Sidwell wrote:
> On 04/25/2017 04:01 PM, David Malcolm wrote:
> > On Tue, 2017-04-25 at 12:11 -0400, Nathan Sidwell wrote:
> > > On 04/25/2017 11:58 AM, David Malcolm wrote:
> > >
> > > > { return FIELD; }
>
Volker's patch for -Wold-style-cast inspired me to add a fix-it hint
for when this warning fires, which converts the C-style cast to
a C++-style cast.
It tries to find a legal C++-style cast, trying them in the order:
const_cast, static_cast, reinterpret_cast. It doesn't try
dynamic_cast. It cal
Ping for these two patches:
- https://gcc.gnu.org/ml/gcc-patches/2017-03/msg00909.html
- https://gcc.gnu.org/ml/gcc-patches/2017-03/msg00910.html
On Thu, 2017-03-16 at 21:51 -0400, David Malcolm wrote:
> It's possible to run GCC's sources through Doxygen by setting
>
On Sat, 2017-04-29 at 19:42 +0200, Volker Reichelt wrote:
> Hi,
>
> the following patch adds fix-it hints to the C++ parser for a stray
> comma and a missing semicolon at the end of a member declaration.
>
> Bootstrapped and regtested on x86_64-pc-linux-gnu.
>
> OK for trunk?
OK for trunk
Than
The original implementation of fix-it hints (r230674) had an abstract
base class "fixit_hint" and three subclasses, representing
each of insertions, replacements, and deletions.
Having multiple classes for fix-it hints was a nuisance, as it required
per-class logic everywhere that the hints were h
Currently the C/C++ frontends discard comments when parsing.
It's possible to set up libcpp to capture comments as tokens,
by setting CPP_OPTION (pfile, discard_comments) to false),
and this can be enabled using the -C command line option (see
also -CC), but c-family/c-lex.c then discards any CPP_C
Previously fix-it hints couldn't contain newlines. This is
due to the need to print something user-readable for them
within diagnostic-show-locus, and for handling them within
edit-context for printing diffs and regenerating content.
This patch enables limited support for fix-it hints with newlin
The existing fix-it printer can lead to difficult-to-read output
when fix-it hints are near each other. For example, in a recent
patch to add fix-it hints to the C++ frontend's -Wold-style-cast,
e.g. for:
foo *f = (foo *)ptr->field;
^
the fix-it hints:
replace the o
On Thu, 2017-04-27 at 23:03 +0200, Marek Polacek wrote:
> On Thu, Apr 27, 2017 at 05:10:24PM -0400, David Malcolm wrote:
> > + /* First try const_cast. */
> > + trial = build_const_cast (dst_type, orig_expr, 0 /* complain
> > */);
> > + if (trial != error_mark_node)
Successfully bootstrapped®rtested on x86_64-pc-linux-gnu.
Committed to trunk as r247562.
gcc/ChangeLog:
* common.opt (fdiagnostics-parseable-fixits): Fix typo.
---
gcc/common.opt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/common.opt b/gcc/common.opt
index 402
As of r247522, fix-it-hints can suggest the insertion of new lines.
This patch uses this to implement a new "maybe_add_include_fixit"
function in c-common.c and uses it in the two places where the C and C++
frontend can suggest missing #include directives. [1]
The idea is that the user can then c
As of r247522, fix-it-hints can suggest the insertion of new lines.
This patch updates -Wimplicit-fallthrough to provide suggestions
with fix-it hints, showing the user where to insert "break;" or
fallthrough attributes.
For example:
test.c: In function 'set_x':
test.c:15:9: warning: this stat
This is the second half of the kit, which uses %H and %I throughout
the C++ frontend whenever describing type mismatches between a pair
of %qT.
gcc/cp/ChangeLog:
* call.c (print_conversion_rejection): Replace pairs of %qT with
%H and %I in various places.
(build_user_type_c
This patch kit implements two new options to make it easier
to read diagnostics involving mismatched template types:
-fdiagnostics-show-template-tree and
-fno-elide-type.
It adds two new formatting codes: %H and %I which are
equivalent to %qT, but are to be used together for type
comparisons e
Calls to gcc_jit_context_get_builtin_function that accessed builtins
in sanitizer.def and after (or failed to match any builtin) led to
a crash accessing a NULL builtin name.
The entries with the NULL name came from these lines in sanitizer.def:
/* This has to come before all the sanitizer buil
When we have a type mismatch in a C++ function call, e.g.
extern int callee (int one, const char *two, float three);
int caller (int first, int second, float third)
{
return callee (first, second, third);
}
we currently emit something like this:
test.c: In function 'int caller(int
When we complain about uses of explicitly-deleted methods, it seems
odd to me to refer to "declared here":
/usr/include/c++/7/bits/stl_pair.h:292:17: error: use of deleted function
'std::unique_ptr<_Tp, _Dp>::unique_ptr(const std::unique_ptr<_Tp, _Dp>&)
[with _Tp = X; _Dp = std::default_delete]'
On Thu, 2017-09-21 at 09:20 -0700, Nathan Sidwell wrote:
> On 09/20/2017 12:52 PM, David Malcolm wrote:
> > When we have a type mismatch in a C++ function call, e.g.
> > whereas underlining the mismatching things would make the messages
> > easier to comprehend:
> >
On Mon, 2017-08-28 at 09:22 -0600, Jeff Law wrote:
> On 07/03/2017 12:37 PM, David Malcolm wrote:
> > This patch improves our C/C++ frontends' handling of missing
> > symbols, by making c_parser_require and cp_parser_require use
> > "better" locations for the
In r251026 (aka 3fe34694f0990d1d649711ede0326497f8a849dc,
"C/C++: show pertinent open token when missing a close token")
I copied part of cp_parser_error into cp_parser_required_error,
leading to duplication of code.
This patch eliminates this duplication by merging the two copies of the
code into
The patch improves our C/C++ frontends' handling of missing
symbols, by making c_parser_require and cp_parser_require use
"better" locations for the diagnostic, and insert fix-it hints,
under certain circumstances (see the comments in the patch for
full details).
For example, for this code with a
There are a few places where the C++ FE will complain when attempting
to do things within an extern "C" linkage specifier.
I've run into problems where it wasn't clear where the pertinent
extern "C" was; for example, when failing to close an extern "C" linkage
specifier in a header, leading to "te
On Fri, 2017-09-22 at 11:21 +0200, Bartosz Szreder wrote:
> Hello David,
>
> > > 1. The documentation doesn't mention existence of
> > > gcc_jit_context_new_function_ptr_type() as a mechanism of
> > > handling
> > > function pointers, yet contains
> > > gcc_jit_context_new_call_through_ptr().
> >
libgccjit was being overzealous when type-checking function pointers,
requiring exact pointer equality of recording::function_type
instances, defeating attempts by client code to work with function
pointers as data.
This patch removes the overzealous checking, and should allow
function pointers to
2901 - 3000 of 5457 matches
Mail list logo