public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/61103] New: False-positive, template-independent name taken as dependent name
@ 2014-05-07 21:10 synxis at gmx dot fr
2014-05-07 21:17 ` [Bug c++/61103] " redi at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: synxis at gmx dot fr @ 2014-05-07 21:10 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61103
Bug ID: 61103
Summary: False-positive, template-independent name taken as
dependent name
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: synxis at gmx dot fr
Created attachment 32756
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32756&action=edit
Source file containing the bug
Hello,
I use a compile-time counter in my library, and it works perfectly when used in
'normal' classes but breaks when used in template class. This behavior is
specific to gcc, as it works in template classes for VC2008->2013 and clang
3.4.
It is based on function overloading, there are comments in the attached code
explained in more details the workflow of the timer.
I've opened a question on Stack Overflow here:
http://stackoverflow.com/questions/23525701/compile-time-counter-behavior-changing-in-a-template-class
This program outputs 2 numbers (with some sugar for human-readability) : 0 and
1 is the expected output, but gcc outputs 1 and 1.
For the version of gcc, I don't know exactly, at least the 4.8.1 (Ideone), but
the versions used by codepad or coliru also have this bug. BTW, the following
source highlights the fact that gcc 'thinks' that it 'Count' is a
dependent-name: http://coliru.stacked-crooked.com/a/daa2c7d956f9ea9a
Thank you in advance.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/61103] False-positive, template-independent name taken as dependent name
2014-05-07 21:10 [Bug c++/61103] New: False-positive, template-independent name taken as dependent name synxis at gmx dot fr
@ 2014-05-07 21:17 ` redi at gcc dot gnu.org
2014-05-15 20:11 ` synxis at gmx dot fr
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2014-05-07 21:17 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61103
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|major |normal
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/61103] False-positive, template-independent name taken as dependent name
2014-05-07 21:10 [Bug c++/61103] New: False-positive, template-independent name taken as dependent name synxis at gmx dot fr
2014-05-07 21:17 ` [Bug c++/61103] " redi at gcc dot gnu.org
@ 2014-05-15 20:11 ` synxis at gmx dot fr
2014-12-14 14:30 ` ville.voutilainen at gmail dot com
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: synxis at gmx dot fr @ 2014-05-15 20:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61103
--- Comment #1 from synxis at gmx dot fr ---
I did some testing and this bug is present on:
gcc 4.7.2
gcc 4.8.1
gcc 4.9.0
at least. Is it possible to have some feedback on it ? Thanks in advance.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/61103] False-positive, template-independent name taken as dependent name
2014-05-07 21:10 [Bug c++/61103] New: False-positive, template-independent name taken as dependent name synxis at gmx dot fr
2014-05-07 21:17 ` [Bug c++/61103] " redi at gcc dot gnu.org
2014-05-15 20:11 ` synxis at gmx dot fr
@ 2014-12-14 14:30 ` ville.voutilainen at gmail dot com
2021-08-02 1:20 ` pinskia at gcc dot gnu.org
2021-12-09 9:22 ` marxin at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: ville.voutilainen at gmail dot com @ 2014-12-14 14:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61103
Ville Voutilainen <ville.voutilainen at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-12-14
CC| |ville.voutilainen at gmail dot com
Ever confirmed|0 |1
Known to fail| |4.8.2, 4.9.1, 5.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/61103] False-positive, template-independent name taken as dependent name
2014-05-07 21:10 [Bug c++/61103] New: False-positive, template-independent name taken as dependent name synxis at gmx dot fr
` (2 preceding siblings ...)
2014-12-14 14:30 ` ville.voutilainen at gmail dot com
@ 2021-08-02 1:20 ` pinskia at gcc dot gnu.org
2021-12-09 9:22 ` marxin at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-02 1:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61103
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Seems fixed since GCC 7+.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/61103] False-positive, template-independent name taken as dependent name
2014-05-07 21:10 [Bug c++/61103] New: False-positive, template-independent name taken as dependent name synxis at gmx dot fr
` (3 preceding siblings ...)
2021-08-02 1:20 ` pinskia at gcc dot gnu.org
@ 2021-12-09 9:22 ` marxin at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-12-09 9:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61103
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |marxin at gcc dot gnu.org
Resolution|--- |FIXED
--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
Fixed with r7-755-g23cb72663051cd3f.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-12-09 9:22 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-07 21:10 [Bug c++/61103] New: False-positive, template-independent name taken as dependent name synxis at gmx dot fr
2014-05-07 21:17 ` [Bug c++/61103] " redi at gcc dot gnu.org
2014-05-15 20:11 ` synxis at gmx dot fr
2014-12-14 14:30 ` ville.voutilainen at gmail dot com
2021-08-02 1:20 ` pinskia at gcc dot gnu.org
2021-12-09 9:22 ` marxin at gcc dot gnu.org
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).