On 11/16/18 1:18 PM, Marek Polacek wrote:
On Fri, Nov 16, 2018 at 12:23:42PM +0530, Umesh Kalappa wrote:
Thank you Marek,Appreciate your valuable feedback on the patch .
Attached the latest ,please do let us know your thoughts.
Thanks, this version looks good! Just some small nits:
--- gcc/cp/parser.c (revision 266026)
+++ gcc/cp/parser.c (working copy)
@@ -24620,6 +24620,12 @@ cp_parser_noexcept_specification_opt (cp_parser* p
{
matching_parens parens;
parens.consume_open (parser);
+
+ tree save_ccp = current_class_ptr;
+ tree save_ccr = current_class_ref;
+
+ if (current_class_type)
+ inject_this_parameter (current_class_type, TYPE_UNQUALIFIED);
This is indented a bit too much: the inject_this_parameter call should be two
spaces to the right of the if. I.e.:
if (current_class_type)
inject_this_parameter (current_class_type, TYPE_UNQUALIFIED);
+2018-11-16 Kamlesh Kumar <kamleshbha...@gmail.com>
+
+ PR c++/52869
+ * g++.dg//DRs/dr1207-1.C: New.
+ * g++.dg//DRs/dr1207-2.C: New.
Just one / instead of two.
--- gcc/testsuite/g++.dg/DRs/dr1207-1.C (nonexistent)
+++ gcc/testsuite/g++.dg/DRs/dr1207-1.C (working copy)
@@ -0,0 +1,25 @@
+// DR 1207
+// PR c++/52869
+// { dg-do compile { target c++11 } }
+
+struct S {
+ void f() { }
+ void g() noexcept(noexcept(f())) { }
+ void h() noexcept(noexcept(this->f())) { }
+};
+
+struct Nyan {
+ Nyan &operator++() noexcept { return *this; }
+ void omg() noexcept(noexcept(++*this)) {}
+};
+
+template <class T>
+class Test{
+ T count;
+ Test (T arg) {count=arg;}
+ void fetch() { }
+ T inc () noexcept(noexcept(this->fetch())) {return ++count;}
+ T dec () noexcept(noexcept(fetch())) { return --count;}
+};
+
+
There are two extra newlines you can remove but otherwise the tests look fine
now.
I'll let Jason review the last version. Thanks for contributing to GCC.
Yes, looks good; I've committed the patch with the changes Marek mentioned.
I see that you don't seem to have a copyright assignment on file with
the FSF; this patch is small enough that it doesn't need it, but you
might want to get one submitted now to ease future patches.
Thanks!
Jason