public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/85808] New: [concepts] unqualified name lookup breaks after qualified lookup in nested requirement
@ 2018-05-16 14:01 Casey at Carter dot net
  0 siblings, 0 replies; only message in thread
From: Casey at Carter dot net @ 2018-05-16 14:01 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85808

            Bug ID: 85808
           Summary: [concepts] unqualified name lookup breaks after
                    qualified lookup in nested requirement
           Product: gcc
           Version: 8.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: Casey at Carter dot net
  Target Milestone: ---

Compiling this program fragment with "g++ -std=c++17 -fconcepts"
(https://godbolt.org/g/EXDoD3):

  namespace X {
      template<class> constexpr bool x = true;
  }

  template<int> using helper = void;

  template<typename T>
  concept bool C = requires {
      requires X::x<T>;
  #ifndef WORKAROUND
      typename helper<T{}>;
  #else
      typename ::helper<T{}>; // Workaround
  #endif
  };

  static_assert(C<int>);

produces diagnostics:

  <source>:11:14: error: 'X::helper' has not been declared
       typename helper<T{}>;
                ^~~~~~
  <source>:11:24: error: expected ';' before '>' token
       typename helper<T{}>;
                          ^
                          ;
  <source>:11:24: error: expected '}' before '>' token
  <source>:8:27: note: to match this '{'
   concept bool C = requires {
                             ^
  <source>:11:25: error: expected primary-expression before ';' token
       typename helper<T{}>;
                           ^
  <source>:15:1: error: expected declaration before '}' token
   };
   ^

rather than the expected successful and silent compile.
>From gcc-bugs-return-604827-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed May 16 14:09:07 2018
Return-Path: <gcc-bugs-return-604827-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 63731 invoked by alias); 16 May 2018 14:09:07 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 61157 invoked by uid 48); 16 May 2018 14:09:02 -0000
From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/85807] [8/9 Regression] ICEs related to noexcept
Date: Wed, 16 May 2018 14:09:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 8.1.0
X-Bugzilla-Keywords: ice-on-valid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: mpolacek at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 8.2
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: keywords bug_status cf_reconfirmed_on cc target_milestone short_desc everconfirmed
Message-ID: <bug-85807-4-6yxnW56hxx@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-85807-4@http.gcc.gnu.org/bugzilla/>
References: <bug-85807-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2018-05/txt/msg01722.txt.bz2
Content-length: 821

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85807

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2018-05-16
                 CC|                            |mpolacek at gcc dot gnu.org
   Target Milestone|---                         |8.2
            Summary|ICEs related to noexcept    |[8/9 Regression] ICEs
                   |                            |related to noexcept
     Ever confirmed|0                           |1

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Confirmed.
>From gcc-bugs-return-604828-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed May 16 14:13:22 2018
Return-Path: <gcc-bugs-return-604828-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 130193 invoked by alias); 16 May 2018 14:13:22 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 130071 invoked by uid 48); 16 May 2018 14:13:14 -0000
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/85807] [8/9 Regression] ICEs related to noexcept
Date: Wed, 16 May 2018 14:13:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 8.1.0
X-Bugzilla-Keywords: ice-on-valid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: rguenth at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P2
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 8.2
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: priority cf_known_to_work cf_known_to_fail
Message-ID: <bug-85807-4-Dsgk9WR7x9@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-85807-4@http.gcc.gnu.org/bugzilla/>
References: <bug-85807-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2018-05/txt/msg01723.txt.bz2
Content-length: 402

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85807

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2
      Known to work|                            |7.3.1
      Known to fail|                            |8.1.0
>From gcc-bugs-return-604829-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed May 16 14:14:57 2018
Return-Path: <gcc-bugs-return-604829-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 1304 invoked by alias); 16 May 2018 14:14:57 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 1189 invoked by uid 48); 16 May 2018 14:14:48 -0000
From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/85807] [8/9 Regression] ICEs related to noexcept
Date: Wed, 16 May 2018 14:14:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 8.1.0
X-Bugzilla-Keywords: ice-on-valid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: mpolacek at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P2
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 8.2
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-85807-4-VIqkNjuIxX@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-85807-4@http.gcc.gnu.org/bugzilla/>
References: <bug-85807-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2018-05/txt/msg01724.txt.bz2
Content-length: 144

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85807

--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Started with r253599.
>From gcc-bugs-return-604830-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed May 16 14:32:17 2018
Return-Path: <gcc-bugs-return-604830-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 84333 invoked by alias); 16 May 2018 14:32:17 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 84279 invoked by uid 48); 16 May 2018 14:32:11 -0000
From: "sandor.zsuga at jubatian dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/85805] Improper code generation for 64 bit comparisons on avr-gcc
Date: Wed, 16 May 2018 14:32:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: target
X-Bugzilla-Version: 4.8.1
X-Bugzilla-Keywords: wrong-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: sandor.zsuga at jubatian dot com
X-Bugzilla-Status: WAITING
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-85805-4-T32KrYQpe1@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-85805-4@http.gcc.gnu.org/bugzilla/>
References: <bug-85805-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2018-05/txt/msg01725.txt.bz2
Content-length: 281

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85805

--- Comment #2 from Sandor Zsuga <sandor.zsuga at jubatian dot com> ---
Tested on a different machine:

avr-gcc (GCC) 4.9.2

This is what comes with Debian Jessie. The behavior is present (function
compiles to a single "ret").
>From gcc-bugs-return-604831-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed May 16 14:43:01 2018
Return-Path: <gcc-bugs-return-604831-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 119300 invoked by alias); 16 May 2018 14:43:01 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 119262 invoked by uid 48); 16 May 2018 14:42:56 -0000
From: "sandor.zsuga at jubatian dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/85805] Improper code generation for 64 bit comparisons on avr-gcc
Date: Wed, 16 May 2018 14:43:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: target
X-Bugzilla-Version: 4.8.1
X-Bugzilla-Keywords: wrong-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: sandor.zsuga at jubatian dot com
X-Bugzilla-Status: WAITING
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-85805-4-N5hagqFeeJ@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-85805-4@http.gcc.gnu.org/bugzilla/>
References: <bug-85805-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2018-05/txt/msg01726.txt.bz2
Content-length: 553

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85805

--- Comment #3 from Sandor Zsuga <sandor.zsuga at jubatian dot com> ---
I don't have reasonably easy access to a newer version as it doesn't seem like
there were precompiled binaries available for Linux which I could try without
much hassle.

If someone had one laying around, I would appreciate if he gave a go to the
sample with an

    avr-gcc -S -O1 sample.c

where sample.c contained the code above. The resulting assembly file would show
whether the particular GCC version was affected.
>From gcc-bugs-return-604832-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed May 16 14:44:10 2018
Return-Path: <gcc-bugs-return-604832-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 121267 invoked by alias); 16 May 2018 14:44:10 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 120952 invoked by uid 48); 16 May 2018 14:44:05 -0000
From: "paolo.carlini at oracle dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/84588] [8/9 Regression] internal compiler error: Segmentation fault (contains_struct_check())
Date: Wed, 16 May 2018 14:44:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 8.0.1
X-Bugzilla-Keywords: error-recovery, ice-on-invalid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: paolo.carlini at oracle dot com
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P4
X-Bugzilla-Assigned-To: paolo.carlini at oracle dot com
X-Bugzilla-Target-Milestone: 8.2
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-84588-4-Ab8zTTlr6P@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-84588-4@http.gcc.gnu.org/bugzilla/>
References: <bug-84588-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2018-05/txt/msg01727.txt.bz2
Content-length: 3266

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84588

--- Comment #12 from Paolo Carlini <paolo.carlini at oracle dot com> ---
What I'm finishing testing:

Index: cp/parser.c
===================================================================
--- cp/parser.c (revision 260280)
+++ cp/parser.c (working copy)
@@ -21308,7 +21308,7 @@ cp_parser_parameter_declaration_list (cp_parser* p
   while (true)
     {
       cp_parameter_declarator *parameter;
-      tree decl = error_mark_node;
+      tree decl;
       bool parenthesized_p = false;

       /* Parse the parameter.  */
@@ -21316,21 +21316,22 @@ cp_parser_parameter_declaration_list (cp_parser* p
        = cp_parser_parameter_declaration (parser,
                                           /*template_parm_p=*/false,
                                           &parenthesized_p);
+      if (!parameter)
+       {
+         *is_error = true;
+         parameters = error_mark_node;
+         break;
+       }

       /* We don't know yet if the enclosing context is deprecated, so wait
         and warn in grokparms if appropriate.  */
       deprecated_state = DEPRECATED_SUPPRESS;

-      if (parameter)
-       {
-         decl = grokdeclarator (parameter->declarator,
-                                &parameter->decl_specifiers,
-                                PARM,
-                                parameter->default_argument != NULL_TREE,
-                                &parameter->decl_specifiers.attributes);
-         if (decl != error_mark_node && parameter->loc != UNKNOWN_LOCATION)
-           DECL_SOURCE_LOCATION (decl) = parameter->loc;
-       }
+      decl = grokdeclarator (parameter->declarator,
+                            &parameter->decl_specifiers,
+                            PARM,
+                            parameter->default_argument != NULL_TREE,
+                            &parameter->decl_specifiers.attributes);

       deprecated_state = DEPRECATED_NORMAL;

@@ -21340,9 +21341,14 @@ cp_parser_parameter_declaration_list (cp_parser* p
        {
          *is_error = true;
          parameters = error_mark_node;
+         if (parser->fully_implicit_function_template_p)
+           abort_fully_implicit_template (parser);
          break;
        }

+      if (parameter->loc != UNKNOWN_LOCATION)
+       DECL_SOURCE_LOCATION (decl) = parameter->loc;
+
       if (parameter->decl_specifiers.attributes)
        cplus_decl_attributes (&decl,
                               parameter->decl_specifiers.attributes,
Index: testsuite/g++.dg/cpp1y/pr84588.C
===================================================================
--- testsuite/g++.dg/cpp1y/pr84588.C    (nonexistent)
+++ testsuite/g++.dg/cpp1y/pr84588.C    (working copy)
@@ -0,0 +1,10 @@
+// { dg-do compile { target c++14 } }
+// { dg-options "-w" }
+
+struct a {
+  void b() {}
+  void c(auto = [] {
+    if (a a(int auto){})  // { dg-error "two or more data types" }
+      ;
+  }) {}
+};
>From gcc-bugs-return-604833-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed May 16 14:49:58 2018
Return-Path: <gcc-bugs-return-604833-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 46222 invoked by alias); 16 May 2018 14:49:57 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 46162 invoked by uid 48); 16 May 2018 14:49:53 -0000
From: "viktorzoutman at vzout dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/85809] New: SFINAE code compiles that shouldn't be able to compile.
Date: Wed, 16 May 2018 14:49:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 8.1.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: viktorzoutman at vzout dot com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone
Message-ID: <bug-85809-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2018-05/txt/msg01728.txt.bz2
Content-length: 822

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85809

            Bug ID: 85809
           Summary: SFINAE code compiles that shouldn't be able to
                    compile.
           Product: gcc
           Version: 8.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: viktorzoutman at vzout dot com
  Target Milestone: ---

The following SFINAE code shouldn't be able to compile as far as I'm aware.
However it does compile on gcc: https://godbolt.org/g/D5BkWf

The interesting thing is if you comment out line 25 it gives an error as it
should. But line 25 doesn't have anything to do with the incorrect code. As you
can see in the following code example: https://godbolt.org/g/azEvKp
>From gcc-bugs-return-604834-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed May 16 14:58:18 2018
Return-Path: <gcc-bugs-return-604834-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 76824 invoked by alias); 16 May 2018 14:58:18 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 76812 invoked by uid 89); 16 May 2018 14:58:17 -0000
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=automated, our
X-HELO: mx1.redhat.com
Received: from mx3-rdu2.redhat.com (HELO mx1.redhat.com) (66.187.233.73) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 16 May 2018 14:58:16 +0000
Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6])	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))	(No client certificate requested)	by mx1.redhat.com (Postfix) with ESMTPS id 72C5C5BCB6;	Wed, 16 May 2018 14:58:15 +0000 (UTC)
Received: from localhost (unknown [10.33.36.4])	by smtp.corp.redhat.com (Postfix) with ESMTP id 12D79215CDA7;	Wed, 16 May 2018 14:58:14 +0000 (UTC)
Date: Wed, 16 May 2018 14:58:00 -0000
From: Jonathan Wakely <jwakely@redhat.com>
To: Jason Vas Dias <jason.vas.dias@gmail.com>
Cc: Jim Wilson <jimw@sifive.com>, gcc-bugs@gcc.gnu.org
Subject: Re: bug ? : -Wpedantic -Wconversion 'short a=1; a-=1;' complaint
Message-ID: <20180516145814.GA12263@redhat.com>
References: <o9iac8sg.fsf@gmail.com> <f0aa39a7-cdae-764c-3273-298a96899261@sifive.com> <CALyZvKw+JE+WP8KvNZQLOt-h6Ymr_4it7KX2xvOY4heQ4G3y_g@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Disposition: inline
In-Reply-To: <CALyZvKw+JE+WP8KvNZQLOt-h6Ymr_4it7KX2xvOY4heQ4G3y_g@mail.gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
User-Agent: Mutt/1.9.2 (2017-12-15)
X-SW-Source: 2018-05/txt/msg01729.txt.bz2
Content-length: 998

On 16/05/18 13:58 +0000, Jason Vas Dias wrote:
>Great thanks for your informative response, Jim! :
>RE:
>On 23/04/2018, Jim Wilson <jimw@sifive.com> wrote:
>> On 04/23/2018 07:11 AM, Jason Vas Dias wrote:
>>>
>>> I really do not think a '-Wpedantic -Wconversion' warning should
>>> be generated for the following code, but it is
>>> (with GCC 6.4.1 and 7.3.1 on RHEL-7.5 Linux) :
>>>
>>>   $ echo '
>>>   typedef unsigned short U16_t;
>>>   static void f(void)
>>>   { U16_t a = 1;
>>>     a-=1;
>>>   }' > t.C;
>>
>> gcc@gcc.gnu.org dropped as inappropriate.  Note that gcc-bugs is output
>> from our bugzilla.  Sending email here isn't very useful.  If you want a
>> bug fixed, you have to open a bug report in bugzilla.  You can ask gcc
>> questions on gcc help.

Please move this to a mailing list other than gcc-bugs, because as
explained that is for automated email from Bugzilla.

You've added "gcc@gcc.org" which is nothing to do with GCC.
gcc-help@gcc.gnu.org is the right mailing list.



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-05-16 14:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-16 14:01 [Bug c++/85808] New: [concepts] unqualified name lookup breaks after qualified lookup in nested requirement Casey at Carter dot net

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).