* decl.c (grokdeclarator): Fix value assigned to typespec_loc, use
min_location.
/testsuite
2018-05-14 Paolo Carlini
* g++.dg/diagnostic/trailing1.C: New.
---
gcc/cp/decl.c | 4 ++--
gcc/testsuite/g++.dg/diagnostic/trailing1.C | 5
->locations[ds_thread] in the error basing on the gnu bool and
ensure that the caret always points to __thread. All in all, I don't
think it's worth it...
Thanks, Paolo.
///
/cp
2018-07-02 Paolo Carlini
* parser.c (set_and_check_decl_spec_loc): Use rich_locati
|| linemap_location_before_p (line_table,
+locations[ds_restrict], loc)))
loc = locations[ds_restrict];
Why not use min_location here?
Indeed. Thus I successfully tested the below.
Thanks,
Paolo.
//
Index: cp/decl.c
===
in general we don't want to do -
I see that in the case of cap it gives pretty obfuscated results for the
last two tests (what the heck is __lambda3?!?). So, all in all, maybe
print the name once, as parms, or something like that, for the time
being? Or try to avoid %E altogether?
Paolo.
with -Wshadow):
int main() {
int x = 42;
auto lambda0 = [x]() { int x; };
}
I'm thinking that the new diagnostic should be more consistent with it.
Paolo.
Hi,
On 08/07/2018 00:09, Ville Voutilainen wrote:
On 8 July 2018 at 00:35, Paolo Carlini wrote:
Hi,
On 07/07/2018 23:20, Ville Voutilainen wrote:
+ error_at (DECL_SOURCE_LOCATION (old),
+ "capture %qD and lambda parameter %qD "
+
Hi,
noticed three additional error messages where an additional range seems
appropriate. Tested x86_64-linux.
Thanks, Paolo.
//
/cp
2018-07-08 Paolo Carlini
* decl.c (grokdeclarator): Use rich_location::add_range in three
more places; include gcc-rich
(check_redeclaration_no_default_args) which I added (rather) recently,
and I'm exploiting that to allow two existing testcases to compile as
they are. Tested x86_64-linux.
Thanks, Paolo.
/
/cp
2019-07-12 Paolo Carlini
PR c++/59480, DR 136
* d
Hi,
over the last weeks, while working on various diagnostic issues, I
noticed a few defective permerror + inform pairs. Tested x86_64-linux.
Thanks, Paolo.
/cp
2018-07-16 Paolo Carlini
* class.c (resolve_address_of_overloaded_function): Don't em
Hi again,
here I noticed a pair of consecutive permerrors (instead of permerror +
inform) and also that the first one isn't exploiting
DECL_SOURCE_LOCATION (which makes a real difference at least in a couple
of cases which I'm explicitly testing below). Tested x86_64-linux.
Tha
Hi,
On 19/07/2018 10:43, Rainer Orth wrote:
Hi Paolo,
the below resolves the bug report and its duplicates by implementing -
in a rather straightforward way, I believe - the resolution of DR 136,
which also made into C++17. Note that in the patch I used permerror instead
of a plain error for
default arguments and we already diagnosed that, or it doesn't , thus
isn't interesting anymore for the diagnostic at issue.
Thanks! Paolo.
///
/cp
2019-08-01 Paolo Carlini
PR c++/59480, DR 136
* decl.c (check_no_redeclaration_friend_default_args
Hi,
some additional straightforward bits in typeck.c, which I noticed when I
went through the cp_build_binary_op callers. Tested x86_64-linux.
Thanks, Paolo.
//
/cp
2019-10-24 Paolo Carlini
* typeck.c (cp_build_modify_expr): Prefer error + inform to
x.
Thanks, Paolo.
/cp
2019-10-31 Paolo Carlini
* typeck.c (composite_pointer_type): Add a const op_location_t&
parameter and use it in diagnostics.
(composite_pointer_error): Likewise.
(composite_pointer_type_r): Add a const
Hi again,
On 31/10/19 16:56, Paolo Carlini wrote:
Hi,
yesterday I noticed that we want to forward the location parameter of
cp_build_binary_op to composite_pointer_type and then
composite_pointer_error. Note, for the time being at least, this is
always for CPO_COMPARISON, the other two
st_flags_t parameter to the latter and
everything looks finally good for these testcases.
Tested x86_64-linux.
Thanks, Paolo.
/cp
2019-11-12 Paolo Carlini
* typeck.c (cp_truthvalue_conversion): Add tsubst_flags_t parameter
and use it in calls; als
Hi,
in this simple issue we either wrongly talked about variable template-id
in c++17 mode or ICEd in c++2a. I think we simply want to handle
concept-ids first, both as represented in c++17 mode and as represented
in c++2a mode. Tested x86_64-linux.
Thanks, Paolo
Hi,
On 22/01/20 17:27, Jason Merrill wrote:
On 1/22/20 10:22 AM, Paolo Carlini wrote:
Hi,
in this simple issue we either wrongly talked about variable
template-id in c++17 mode or ICEd in c++2a. I think we simply want to
handle concept-ids first, both as represented in c++17 mode and as
Hi,
On 22/01/20 22:32, Jason Merrill wrote:
On 1/22/20 3:31 PM, Paolo Carlini wrote:
Hi,
On 22/01/20 17:27, Jason Merrill wrote:
On 1/22/20 10:22 AM, Paolo Carlini wrote:
Hi,
in this simple issue we either wrongly talked about variable
template-id in c++17 mode or ICEd in c++2a. I think
her a DECL_ATTRIBUTES... Simply recognizing IDENTIFIER_NODEs and
returning false works fine, not sure if we want to do something more
sophisticated. Tested x86_64-linux.
Thanks, Paolo.
Fix "PR c++/90915 ICE in has_attribute, at c-family/c-attribs.c:4221"
A rather s
Hi,
On 29/01/20 19:00, Jason Merrill wrote:
On 1/29/20 4:31 AM, Paolo Carlini wrote:
Hi,
in this regression we issue a diagnostic about an incomplete type
(only a warning by default) and then we crash when we try to query
has_attribute on a member of the type because in such cases the
Hi,
this exemplifies in a compact way the kind of change we can implement
for the other casts too: near the end of cp_parser_functional_cast
instead of using the combined_loc only for the returned cp_expr we can
also pass it to build_functional_cast. Tested x86_64-linux.
Thanks, Paolo
Hi,
as promised, the below takes care of the various remaining casts. It's
mostly mechanical, follows the same approach used for
build_functional_cast. Tested x86_64-linux.
Thanks, Paolo.
gcc/cp
2019-12-06 Paolo Carlini
* typ
Hi,
On 06/12/19 18:53, Jason Merrill wrote:
On 12/6/19 11:14 AM, Paolo Carlini wrote:
Hi,
as promised, the below takes care of the various remaining casts.
It's mostly mechanical, follows the same approach used for
build_functional_cast. Tested x86_64-linux.
It occurs to me that
doing that for a while...
Anyway, the below passed testing.
Thanks, Paolo.
Index: gcc/cp/cp-tree.h
===
--- gcc/cp/cp-tree.h(revision 279041)
+++ gcc/cp/cp-tree.h(working copy)
@@ -6998,7
few other minor changes, like two additional uses of
DECL_SOURCE_LOCATION, cp_expr_loc_or_input_loc, removal of an unused
function.
Tested x86_64-linux.
Thanks, Paolo.
//
/gcc/cp
2019-12-16 Paolo Carlini
* typeck.c (cxx_sizeof_or_alignof_type): Add
Hi,
more of the last idea, this time applied to cp_parser_delete_expression
/ delete_sanity (thus build_delete and build_vec_delete which provide
tests). Nothing particularly remarkable in this case. Tested x86_64-linux.
Thanks, Paolo.
///
/gcc/cp
2019-12-20
, I'd rather work on that at
a later time. Tested x86_64-linux.
Thanks, Paolo.
///
/gcc/cp
2020-01-02 Paolo Carlini
* init.c (build_new): Add location_t parameter and use it throughout.
(build_raw_new_expr): Likewise.
Hi,
On 06/01/20 21:47, Jason Merrill wrote:
On 1/2/20 4:23 AM, Paolo Carlini wrote:
@@ -19320,8 +19320,8 @@ tsubst_copy_and_build (tree t,
tree op1 = tsubst (TREE_OPERAND (t, 1), args, complain,
in_decl);
tree op2 = RECUR (TREE_OPERAND (t, 2));
- ret = build_new
t was broken, please consider this one instead:
Yes, this one makes sense (and the current code would not work since it
lacks the prev- prefix on TARGET_LIB_PATH).
Paolo
Hi,
simply matter of using __SIZE_TYPE__. Committed to mainline.
Thanks,
Paolo.
///
2013-08-20 Paolo Carlini
PR c++/58190
* g++.dg/pr57878.C: Use __SIZE_TYPE__.
Index: g++.dg/pr57878.C
===
--- g
Hi,
On 08/20/2013 01:48 PM, Jakub Jelinek wrote:
On Tue, Aug 20, 2013 at 01:40:59PM +0200, Paolo Carlini wrote:
simply matter of using __SIZE_TYPE__. Committed to mainline.
Please apply it to branches/gcc-4_8-branch too.
More information bug reporter didn't provide ;) Ok.
Also note tha
Hi,
in mainline we don't ICE anymore. Tested x86_64-linux multilib.
Thanks,
Paolo.
2013-08-21 Paolo Carlini
PR c++/56134
* g++.dg/ext/attr-alias-3.C: New.
Index: g++.dg/ext/attr-alia
, because the warning is enabled by default.
Booted and tested x86_64-linux.
Thanks,
Paolo.
//
/cp
2013-08-21 Paolo Carlini
PR c++/56130
* semantics.c (finish_id_expression): Handle deprecated references.
/testsuite
2013-08-21 Paolo Carlini
PR c
Hi again,
On 08/21/2013 03:45 PM, Paolo Carlini wrote:
Hi,
this bug points out that we fail to emit deprecated warnings when
references are involved. Turns out that at the end of
finish_id_expression the VAR_DECL is wrapped in INDIRECT_REF. The
trivial patch below appears to work fine and
Hi,
earlier today noticed three spots where we don't use the existing
INDIRECT_REF_P predicate. I think the patch qualifies as obvious, and
I'm going to apply it later today.
Thanks,
Paolo.
/
2013-08-21 Paolo Carlini
* call.c (build_new_met
On 08/22/2013 05:55 AM, Tim Shen wrote:
I simply replace 8 spaces in indentation with a tab.
Bootstrap passed.
Ok, thanks!
Paolo.
tested x86_64-linux.
Thanks,
Paolo.
//
/cp
2013-08-22 Paolo Carlini
PR c++/56380
* class.c (check_field_decls): Check for const mutable and const
reference data members.
/testsuite
2013-08-22 Paolo Carlini
PR c++/56380
* g
inal (pun intended
;) decision?
Thanks!
Paolo.
n | cris | i386 | m32c | m68k | microblaze'
make[1]: *** [configure-gcc] Error 1
Paolo.
.. missing backslashes I would say.
Paolo.
... I'm testing the below. Works fine so far. I'm going to commit it as
soon as a bootstrap on x86_64-linux completes again.
Paolo.
Index: configure.ac
===
--- configure.ac(revis
st the specific functions you are changing.
It's important.
Thanks,
Paolo.
nspired by the use in maybe_instantiate_noexcept). In
particular, I fear memory leaks or mismanagement (I see a ggc_free
(tinst); in instantiate_alias_template which I don't fully understand).
Also, I wonder if we could provide more detailed information...
Thanks in
On 08/23/2013 03:47 PM, Jason Merrill wrote:
On 08/22/2013 12:05 PM, Paolo Carlini wrote:
Sorry if I'm saying something rather vague: I suppose you mean
BINFO_FLAG_6? Because it's the last one.
No, that's a language-specific flag.
Ah great. Thanks!
Paolo.
On 08/23/2013 03:59 PM, Tim Shen wrote:
On Fri, Aug 23, 2013 at 6:29 PM, Paolo Carlini wrote:
Thanks a lot indeed. But: "Fix callers" of *what*?!? And from *where*? To be
really honest this kind of ChangeLog entry doesn't make much sense. Please
get used to list the specific fu
On 08/23/2013 04:53 PM, Tim Shen wrote:
On Fri, Aug 23, 2013 at 10:26 PM, Paolo Carlini
wrote:
Great. But please but the names of the functions you are changing between
round brackets. You have tons of examples everywhere.
...like this?
The assign change is fine. But I would also put between
Hi,
On 08/23/2013 05:12 PM, Jan Hubicka wrote:
+/* { dg-final { scan-tree-dump-nop "A::foo" 0 "ssa"} } */
This should be scan-tree-dump-not right?
Paolo.
Hi,
this bug, filed by Diego, is about 8.3.6/6, where member functions of
class templates, at variance with plain classes, do not admit default
arguments on the out-of-class redeclaration.
Tested x86_64-linux.
Thanks,
Paolo.
//
/cp
2013-08-25 Paolo Carlini
in this scope
make[2]: *** [c/c-objc-common.o] Error 1
If I don't hear from you I'm going to commit as obvious the below.
Thanks!
Paolo.
Index: c-objc-common.c
===
--- c-objc-common.c (revis
On 08/26/2013 11:20 AM, Gabriel Dos Reis wrote:
You need more than that. The rest of patch is in trunk now.
Sorry for the breakage -- as you probably guessed, I specified only
c-family directory on the commit command line.
Thanks!
Paolo.
Hi,
a few days ago I noticed this comment and code. Removing it passes
testing on x86_64-linux (I would in any case also boot and test multilib
before committing).
Admittedly, a bit risky, but Stage 1 seems the right time to try.
Thanks!
Paolo.
2013-08-26 Paolo
the inform would often not be that useful, depending on the target
type, but in fact I tried and it *never* (X) triggers in our whole
testsuite, thus I'm not that worried anymore ;)
Tested x86_64-linux.
Thanks,
Paolo.
(X) Without the class type check it would trigger 2 times in
g++.old-dej
.
Paolo.
a3(2); /* Ok */
As expected, in such cases init is an INTEGER_CST, a NULL_TREE and a
TREE_LIST of a single INTEGER_CST, respectively.
Booted and tested x86_64-linux.
Thanks,
Paolo.
/
/cp
2013-08-28 Paolo Carlini
PR c++/58255
* init.c (build_aggr
Hi,
On 08/29/2013 10:11 AM, Jan Hubicka wrote:
Paolo,
there seems to be one extra issue about this patch. It causes quite a twist in
libstdc++ exported symbols.
It is purpose of the patch to remove those that are going to be generated in
user programs, too.
I am however bit confused about bad
bi failing, either a complete change,
or nothing.
Thanks!
Paolo.
matching (which looks inside CALL_EXPRs) would miss some cases, like
when the self-delegation is only in the derived type, not in the base.
Tested x86_64-linux.
Thanks!
Paolo.
/
/cp
2013-08-29 Paolo Carlini
PR c++/51424
* cp-tree.h
Hi,
On 08/29/2013 09:40 PM, Jason Merrill wrote:
On 08/29/2013 11:24 AM, Paolo Carlini wrote:
+ if ((complain & tf_error)
+ && (flags & LOOKUP_DELEGATING_CONS)
+ && name == complete_ctor_identifier
+ && TREE_CODE (ret) == CALL_EXPR
+ &&
I'm attaching below
something I quickly hacked, untested, see if you like it in case commit
something similar.
Thanks!
Paolo.
//
Index: functions.h
===
--- functions.h (revision 202068)
+++ functions.h
Hi again,
On 08/30/2013 11:06 AM, Paolo Carlini wrote:
I could, for example pass down a separate bit, instead of playing
again with the LOOKUP_* bits. At some point yesterday I even had that
version tested ;)
In practice, something like the attached.
By the way, as regards this comment in cp
suite/21_strings is completely structured this way.
Paolo.
example, when I see a bool sandwiched between big objects something
seems at least weird... Let's make measurements and optimize for 64-bit
but let's double check on 32-bit too.
Paolo.
Hi,
> wrote:
>> Other than the test case (breaks on mingw32 target) this is looking
>very sweet.
>
>Could you please show some details?
I suppose he referred to the char/wchar_t split which I described...
Thanks!
Paolo
with c++/21682 (using24.C) and reject the testcase which I
discussed in DR 565 (using25.C) (*)
Booted & tested x86_64-linux.
Thanks!
Paolo.
(*) Likewise current clang.
//
/cp
2013-09-01 Paolo Carlini
PR c++/21682, implement DR 565
* name-look
.. consider this withdrawn, I have to fix another very similar check
elsewhere.
Paolo.
Hi again,
... thus Take 2: the extended comparison per DR 565 must be used in
push_overloaded_decl_1 too, in order to handle correctly the case of an
using decl *followed* by a decl. I added a testcase too.
Again booted and tested x86_64-linux.
Thanks,
Paolo.
//
/cp
Hi,
a very stupid typo. Tested x86_64-linux, fixed in the active branches.
Thanks,
Paolo.
//
2013-09-03 Paolo Carlini
PR libstdc++/58302
* include/bits/random.tcc (negative_binomial_distribution<>::
operator()(_UniformRandomNumberGen
;
of g++.dg/parse/attr3.C. This seems wrong per our documentation, because
those lines do not *name* the deprecated types E and F, but may make
sense, for example clang++ *does* warn on those.
Tested x86_64-linux.
Thanks!
Paolo.
/cp
2013-09-03 Paolo Ca
.. unfortunately the issue isn't so easy because in any case we don't
want to warn for typedefs of ToBeDeprecated.
Paolo.
se ;)
Thanks a lot for now, let's see if there are more (substantive) comments...
Paolo.
On 09/03/2013 11:32 PM, Jason Merrill wrote:
On 09/03/2013 11:10 AM, Paolo Carlini wrote:
ToBeDeprecated();
I'd rather handle this case in build_functional_cast.
Indeed. Thanks for the great tip. A tried to find a place where I could
use the same check we have in grokdecla
aggregates.
The patch seems large but in fact just moves to a recursive helper the
code that currently handles anonymous aggregates in finish_struct_anon.
Patch appears to work well, no regressions etc, I'm not 100% sure we
couldn't simplify a bit the new finish_struct_anon_r.
Tha
ested x86_64-linux.
Paolo.
/
Index: cp/class.c
===
--- cp/class.c (revision 202241)
+++ cp/class.c (working copy)
@@ -2773,15 +2773,96 @@ warn_hidden (tree t)
}
}
+/* Recursive helper for finish_struct_anon. */
+
+s
first time is called complain == true (thus does exactly what the
current code does), then when the recursion proper starts, complain ==
false. Or you mean something else?
Paolo.
, doesn't exist
in the current code handling the fields of an anon aggr. All in all I rather
prefer this kind of solution, in my opinion the typical recursion here is very
shallow and in this way the amount of new code is minimized.
Thanks,
Paolo
"
"this->size() (which is %zu)"), __n, this->size());
That seems worth exploring, I agree.
Paolo.
Hi,
On 09/05/2013 01:36 AM, Paul Pluzhnikov wrote:
On Wed, Sep 4, 2013 at 4:26 PM, Paolo Carlini wrote:
For sure concat_size would not be Ok, isn't uglified.
I didn't uglify it because it's inside __gnu_cxx namespace.
Does it still need uglification?
Yes.
snprintf_l
On 09/04/2013 05:37 AM, Tim Shen wrote:
According to this
email(http://gcc.gnu.org/ml/libstdc++/2013-09/msg5.html), I add a
testcase.
Thanks. Apparently there aren't further comments, thus please install it.
Thanks again,
Paolo.
error (we used to ICE) but arguably we
should only warn and explain the possible undefined behavior at runtime,
consistently with what we do for the non-array variant of delete (clang
and icc likewise warn). I tested the below on x86_64-linux.
Thanks!
Paolo.
///
/cp
2013
date testresults are arriving only now
on gcc-testresults confirming my finding, for example Andreas Schwab
already posted a couple.
Thanks!
Paolo.
case, move call to assemble_vtv_preinit_initializer to
after call to cgraph_process_new_functions.
Thanks Caroline. Let's add Jason in CC, I almost missed the patch myself
(and I was actively paying attention to the issue)
Paolo.
and that this should be a very uncommon error message,
but, I'm wondering, is it possible that other errors, for other issues,
are also affected? That is, other diagnostic happening very late and
sensitive to the recent rework?
Paolo.
n
the location is UNKNOWN? I don't think there are existing cases where it's sane
to say :0:0 as "required from"!?!
Short term at least, it would seem a good enough solution to me + a comment in
testcase too.
Then indeed as you explained in your last message before leaving (enjoy Pisa!
All in all I spent there ~10 years!) we should audit, avoid as much as possible
such late diagnostic, etc.
What do you think?
Paolo
proposed about UNKNOWN_LOCATION + the
tweak to print_instantiation_partial_context_line (essentially just
return immediately if loc == UNKNOWN_LOCATION, I think)
Paolo.
-- Caroline,
something seems wrong with the patch, I can't build anymore. Something
in libvtv/testsuite:
make[4]: Entering directory
`/home/paolo/Gcc/svn-dirs/trunk-build/x86_64-unknown-linux-gnu/libvtv/testsuite'
Makefile:369: *** missing separator. Stop.
Paolo.
Hi again,
On 09/07/2013 10:41 PM, Paolo Carlini wrote:
-- Caroline,
something seems wrong with the patch, I can't build anymore. Something
in libvtv/testsuite:
make[4]: Entering directory
`/home/paolo/Gcc/svn-dirs/trunk-build/x86_64-unknown-linux-gnu/libvtv/testsuite'
Ma
revert it.
What would you say about the revision range?
Paolo.
.. it's r202296 aka bootstrap/58340, Jeff is already on it.
Paolo.
would often fail early, and should
be rather efficient anyway because the second argument is known at
compile-time.
Tested x86_64-linux.
Thanks,
Paolo.
2013-09-08 Paolo Carlini
PR c++/54941
* diagnostic.c (diagnostic_build_prefix): When s.fi
Hi Gaby,
On 09/08/2013 03:41 PM, Gabriel Dos Reis wrote:
On Sun, Sep 8, 2013 at 8:00 AM, Paolo Carlini wrote:
Hi all, Gaby,
in this bug Manuel noticed that the zeros in the diagnostic lines of the
form:
:0:0:
don't provide useful information. Thus the below just avoids printin
6_64-linux.
Thanks!
Paolo.
PS: sorry, not 100% sure about the maintainers of this file, I'm adding
a couple of CCs.
2013-09-09 Marc Glisse
Paolo Carlini
PR c++/58362
* function.c (do_warn_unused_parameter): Use DECL_SOURCE_LOCATION.
case of NULL
second operand is handled correctly. What do you think about the below?
Certainly passes the testsuite and the pretty printing for 58363 is Ok.
Thanks!
Paolo.
///
2013-09-08 Paolo Carlini
* error.c (dump_expr, [PSEUDO_DTOR_EXPR]): Fix.
Hi Richard,
On 09/09/2013 09:46 AM, Richard Biener wrote:
On Sun, 8 Sep 2013, Paolo Carlini wrote:
Hi,
this patchlet fixes the column # of the unused parameter warnings emitted by
do_warn_unused_parameter by explicitly passing DECL_SOURCE_LOCATION (decl)
instead of wrongly relying on
re or less what Marc &
I & Manuel figured out, or we try to change the definition of
location_of, which impacts a lot of code...
Paolo.
eter %qD", decl);
no? Unless I misunderstand what %q+D should do.
See my previous email Richard. The situation should be rather clear now.
Paolo.
u go to cp_printer for C++, thus location_of for C++. In C
is different, but again there is, evidently, a mechanism which uses
DECL_CONTEXT for PARM_DECLs which leads to an inaccurate location when
we *really* want the location of the parameter (exactly as I explained
for C++).
Paolo.
On 09/09/2013 12:08 PM, Paolo Carlini wrote:
Everything happens via call backs. Thus from the generic diagnostic
machinery, you go to cp_printer for C++, thus location_of for C++. In
C is different, but again there is, evidently, a mechanism which uses
DECL_CONTEXT for PARM_DECLs which leads
lying on '+' in this case (like in *many* existing others) doesn't
work, because, in C++, location_of does t = DECL_CONTEXT (t) which is
almost right but not really, we want the location of the PARM_DECL. The
C front-end does something very similar (as the inaccurate location shows).
What do you think?
Paolo.
Hi,
On 09/09/2013 06:35 AM, Jason Merrill wrote:
On 09/05/2013 06:44 PM, Paolo Carlini wrote:
+ && warning (0, "possible problem detected in invocation of "
+ "delete [] operator:"))
The warning should probably be suppressible by some flag.
In fa
1 - 100 of 3594 matches
Mail list logo