Bug 431686
| Summary: | Error on template expansion with function with default argument | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Horst H. von Brand <vonbrand> | ||||||
| Component: | gcc | Assignee: | Jakub Jelinek <jakub> | ||||||
| Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
| Severity: | medium | Docs Contact: | |||||||
| Priority: | low | ||||||||
| Version: | rawhide | Keywords: | Reopened | ||||||
| Target Milestone: | --- | ||||||||
| Target Release: | --- | ||||||||
| Hardware: | i386 | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2008-02-06 15:38:51 UTC | Type: | --- | ||||||
| Regression: | --- | Mount Type: | --- | ||||||
| Documentation: | --- | CRM: | |||||||
| Verified Versions: | Category: | --- | |||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||
| Embargoed: | |||||||||
| Attachments: |
|
||||||||
|
Description
Horst H. von Brand
2008-02-06 14:31:36 UTC
Created attachment 294106 [details]
A C++ file that shows the error
That's a bug in the testcase. See http://gcc.gnu.org/ml/gcc-patches/2007-07/msg01645.html and http://gcc.gnu.org/PR32839 I'm sorry, but that doesn't look right. int f(int i = 117); has what type? int (*)() or int (*)(int)? If I go: int f(); int f(int); what is the type of f? I'd say this is ambiguous, to say the least. Besides, gcc-4.1 did do "the right thing", i.e., consider the first alternative (which matches). Created attachment 294113 [details]
Another testcase
How come callf() gives an error, while the completely equivalent callg() goes
through?
If you want to argue about this, do so upstream in the PR I referenced. I'm not convinced you are right. Reported as 35106 on GCC's bugzilla |