Bug 98115

Summary: [11 Regression] error: partial specialization ‘class Stringify<const char [N]>’ is not more specialized than [-fpermissive] since r11-5663-g329ae1d7751346ba
Product: gcc Reporter: Martin Liška <marxin>
Component: c++Assignee: Nathan Sidwell <nathan>
Status: RESOLVED FIXED    
Severity: normal CC: nathan
Priority: P3    
Version: 11.0   
Target Milestone: 11.0   
See Also: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98116
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109065
Host: Target:
Build: Known to work: 10.2.0
Known to fail: 11.0 Last reconfirmed: 2020-12-03 00:00:00

Description Martin Liška 2020-12-03 09:24:47 UTC
Since the revision I see:

$ cat layout.ii
template <class> class Stringify;
template <long N> class Stringify<const char[N]>;

$ g++ layout.ii -c
layout.ii:2:25: error: partial specialization ‘class Stringify<const char [N]>’ is not more specialized than [-fpermissive]
    2 | template <long N> class Stringify<const char[N]>;
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~
layout.ii:1:24: note: primary template ‘template<class> class Stringify’
    1 | template <class> class Stringify;
      |                        ^~~~~~~~~
Comment 1 GCC Commits 2020-12-03 16:43:37 UTC
The master branch has been updated by Nathan Sidwell <nathan@gcc.gnu.org>:

https://gcc.gnu.org/g:7254a78cf4c419a9b9361289d8c535130cf1dfd0

commit r11-5712-g7254a78cf4c419a9b9361289d8c535130cf1dfd0
Author: Nathan Sidwell <nathan@acm.org>
Date:   Thu Dec 3 08:40:43 2020 -0800

    c++: Testcases [PR 98115]
    
    These two testcases provide coverage for 98115, which doesn't trigger on all hosts.
    
            PR c++/98115
            PR c++/98116
            gcc/testsuite/
            * g++.dg/template/pr98115.C: New.
            * g++.dg/template/pr98116.C: New.
Comment 2 Nathan Sidwell 2020-12-03 16:44:18 UTC
Fixed 7254a78cf4c