Bug 98115 - [11 Regression] error: partial specialization ‘class Stringify<const char [N]>’ is not more specialized than [-fpermissive] since r11-5663-g329ae1d7751346ba
Summary: [11 Regression] error: partial specialization ‘class Stringify<const char [N]...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 11.0
: P3 normal
Target Milestone: 11.0
Assignee: Nathan Sidwell
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-03 09:24 UTC by Martin Liška
Modified: 2023-03-09 17:29 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work: 10.2.0
Known to fail: 11.0
Last reconfirmed: 2020-12-03 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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