Hello,
Should I continue using this email address to contact you?
Farhan Faruqui
Some builtin macros are only defined when certain command-line options
are provided. Update the error messages for them so that we suggest
the pertinent option ('-fopenacc' for '_OPENACC', and '-fopenmp' for
'_OPENMP')
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk
PR c++/86329 reports that the C++ frontend can offer bogus suggestions like:
#include
int compare()
{
return __n1 - __n2;
}
suggested.cc: In function 'int compare()':
suggested.cc:5:10: error: '__n1' was not declared in this scope
return __n1 - __n2;
gcc/cp/ChangeLog:
Backport of r259720 from trunk.
2018-04-27 David Malcolm
PR c++/85515
* name-lookup.c (consider_binding_level): Skip compiler-generated
variables.
* search.c (lookup_field_fuzzy_info::fuzzy_lookup_field): Flatten
nested i
OK.
On Wed, Jun 27, 2018 at 3:01 PM, David Malcolm wrote:
> PR c++/86329 reports that the C++ frontend can offer bogus suggestions like:
>
> #include
>
> int compare()
> {
> return __n1 - __n2;
> }
>
> suggested.cc: In function 'int compare()':
&g
PR c++/86329 reports that the C++ frontend can offer bogus suggestions like:
#include
int compare()
{
return __n1 - __n2;
}
suggested.cc: In function 'int compare()':
suggested.cc:5:10: error: '__n1' was not declared in this scope
return __n1 - __n2;
^~~~
sug
On Thu, Apr 26, 2018 at 8:09 PM, David Malcolm wrote:
> On Thu, 2018-04-26 at 15:53 -0400, Jason Merrill wrote:
>> On Thu, Apr 26, 2018 at 3:45 AM, Richard Biener
>> wrote:
>> > On Wed, Apr 25, 2018 at 7:10 PM, Nathan Sidwell
>> > wrote:
>> > > On 04/25/2018 11:41 AM, David Malcolm wrote:
>> > >
On Thu, 2018-04-26 at 15:53 -0400, Jason Merrill wrote:
> On Thu, Apr 26, 2018 at 3:45 AM, Richard Biener
> wrote:
> > On Wed, Apr 25, 2018 at 7:10 PM, Nathan Sidwell
> > wrote:
> > > On 04/25/2018 11:41 AM, David Malcolm wrote:
> > > >
> > > > Jason Turner's video C++ Weekly - Ep 112 - GCC's Le
On Thu, Apr 26, 2018 at 3:45 AM, Richard Biener
wrote:
> On Wed, Apr 25, 2018 at 7:10 PM, Nathan Sidwell wrote:
>> On 04/25/2018 11:41 AM, David Malcolm wrote:
>>>
>>> Jason Turner's video C++ Weekly - Ep 112 - GCC's Leaky Abstractions shows
>>> two issues where g++ offers suggestions about imple
On Wed, Apr 25, 2018 at 7:10 PM, Nathan Sidwell wrote:
> On 04/25/2018 11:41 AM, David Malcolm wrote:
>>
>> Jason Turner's video C++ Weekly - Ep 112 - GCC's Leaky Abstractions shows
>> two issues where g++ offers suggestions about implementation details:
>
>
>> For the lambda capture case, there a
On 04/25/2018 11:41 AM, David Malcolm wrote:
Jason Turner's video C++ Weekly - Ep 112 - GCC's Leaky Abstractions shows
two issues where g++ offers suggestions about implementation details:
For the lambda capture case, there are multiple members:
$9 =
These names have a space at the end, so
On Wed, Apr 25, 2018 at 11:41:51AM -0400, David Malcolm wrote:
> @@ -1224,9 +1225,19 @@ lookup_field_fuzzy_info::fuzzy_lookup_field (tree type)
>
>for (tree field = TYPE_FIELDS (type); field; field = DECL_CHAIN (field))
> {
> - if (!m_want_type_p || DECL_DECLARES_TYPE_P (field))
> -
Jason Turner's video C++ Weekly - Ep 112 - GCC's Leaky Abstractions shows
two issues where g++ offers suggestions about implementation details:
Example 1:
int main ()
{
auto lambda = [val = 2](){};
lambda.val;
}
: In function 'int main()':
:5:10: error: 'struct main()::' has no member named
On Tue, Jan 10, 2017 at 08:47:26PM -0500, David Malcolm wrote:
> + /* For -fsanitize-recover= (and not -fno-sanitize-recover=),
> + don't offer the non-recoverable options. */
> + if (!sanitizer_opts[i].can_recover && code == OPT_fsanitize_recover_
>
onditions you
suggest (and new test cases for them).
Successfully bootstrapped®rtested on x86_64-pc-linux-gnu.
OK for trunk?
gcc/ChangeLog:
PR driver/78877
* opts.c: Include "spellcheck.h"
(struct string_fragment): New struct.
(struct edit_distance_traits)
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. */
> +
> +static const char *
> +get_closest_sanitizer_option (const string_fragment &arg)
> +{
> + best_m
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):
Hi!
On Mon, Dec 19, 2016 at 11:51:29AM -0500, David Malcolm wrote:
> +/* Look for near matches for the scoped attribute with namespace NS and
> + name NAME.
> + Return the best matching attribute name, or NULL if none is found.
> + If it returns non-NULL then *UNDERSCORES is written to, with
o..
(warn_about_unidentified_attribute): ...this new function, and
potentially offer suggestions for misspelled attributes.
gcc/testsuite/ChangeLog:
PR c/70186
* c-c++-common/spellcheck-attributes.c: New test case.
* g++.dg/cpp0
ffering it as a
suggestion will always be nonsensical e.g.
'constexpr' does not name a type; did you mean 'constexpr'?
Ultimately such suggestions are due to bugs in constructing the
candidate list.
As a band-aid, the patch updates
best_match::get_best_meaningful_candid
nsical e.g.
'constexpr' does not name a type; did you mean 'constexpr'?
Ultimately such suggestions are due to bugs in constructing the
candidate list.
As a band-aid, the patch updates
best_match::get_best_meaningful_candidate so that we no longer
offer suggestions for th
On Mon, 27 Jun 2016, David Malcolm wrote:
> Another use of spellcheck.{c|h}, this time for --param.
>
> Successfully bootstrapped®retested on x86_64-pc-linux-gnu;
> adds 4 PASS results to gcc.sum.
>
> OK for trunk?
OK.
--
Joseph S. Myers
jos...@codesourcery.com
Another use of spellcheck.{c|h}, this time for --param.
Successfully bootstrapped®retested on x86_64-pc-linux-gnu;
adds 4 PASS results to gcc.sum.
OK for trunk?
gcc/ChangeLog:
* opts.c (handle_param): Use find_param_fuzzy to offer suggestions
for misspelled param names
OK, thanks.
Jason
asses bootstrap®rtest?
Oops; it didn't. Sorry.
Updated patch attached; this one does pass bootstrap®rtest.
OK for trunk?
>From fdf5026e324e00d66774c9f581840120061d4e39 Mon Sep 17 00:00:00 2001
From: David Malcolm
Date: Fri, 13 Nov 2015 15:30:18 -0500
Subject: [PATCH] C++ FE: offer su
fuzzy_info::fuzzy_lookup_fnfields): New.
(lookup_field_fuzzy_info::fuzzy_lookup_field): New.
(lookup_field_fuzzy_r): New.
(lookup_member_fuzzy): New.
* typeck.c (finish_class_member_access_expr): When issuing
a "has no member named" error, call lookup_member_fuzzy, a
26 matches
Mail list logo