Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PATCH] c++: Fall through for arrays of T vs T cv [PR104996] #70

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Commits on Apr 18, 2022

  1. [PATCH] c++: Fall through for arrays of T vs T cv [PR104996]

    If two arrays do not have the exact same element type including qualification, this could be e.g. f(int (&&)[]) vs. f(int const (&)[]), which can still be distinguished by the lvalue-rvalue tiebreaker.
    
    By tightening this branch (in accordance with the letter of the Standard) we fall through to the next branch, which tests whether they have different element type ignoring qualification and returns 0 in that case; thus we only actually fall through in the T[...] vs. T cv[...] case, eventually considering the lvalue-rvalue tiebreaker at the end of compare_ics.
    
    Signed-off-by: Ed Catmur <ed@catmur.uk>
    
    	PR c++/104996
    
    gcc/cp/ChangeLog:
    
    	* call.cc (compare_ics): When comparing list-initialization sequences, do not return early.
    
    gcc/testsuite/ChangeLog:
    
    	* g++.dg/cpp0x/initlist129.C: New test.
    ecatmur committed Apr 18, 2022
    Configuration menu
    Copy the full SHA
    1e6c72d View commit details
    Browse the repository at this point in the history

Commits on Jul 17, 2022

  1. Configuration menu
    Copy the full SHA
    dbf5427 View commit details
    Browse the repository at this point in the history

Commits on Jul 27, 2022

  1. Configuration menu
    Copy the full SHA
    aacd65f View commit details
    Browse the repository at this point in the history

Commits on Jul 28, 2022

  1. Configuration menu
    Copy the full SHA
    559a7af View commit details
    Browse the repository at this point in the history