public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "opichals at seznam dot cz" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/32549] New: Wrong template instance resolution among multiple object files. Date: Fri, 29 Jun 2007 17:44:00 -0000 [thread overview] Message-ID: <bug-32549-14781@http.gcc.gnu.org/bugzilla/> (raw) There seems to be something inconsistent in the g++ template instantiation. When a template is instantiated with an argument of the same name in two object files in which the argument type is different (unlike their names). It appears that even though that those instances should have been distinct g++ resolves them into a single one which appears to be wrong. Please see the attached reproduction code. The code of the template only prints the sizeof() of its (template) argument. The argument if places in a global namespace in each of the object files is considered to be the same no matter of its size or structure (as long as it is of the same name). I have reproduced the gcc 3.4.6 and gcc 4.0.1 to behave the same in this aspect (see the attached test output files). -- Summary: Wrong template instance resolution among multiple object files. Product: gcc Version: 4.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: opichals at seznam dot cz GCC build triplet: x86 GCC host triplet: x86 GCC target triplet: x86 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32549
next reply other threads:[~2007-06-29 17:44 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2007-06-29 17:44 opichals at seznam dot cz [this message] 2007-06-29 17:46 ` [Bug c++/32549] " opichals at seznam dot cz 2007-06-29 19:46 ` pinskia at gcc dot gnu dot org 2007-06-30 15:05 ` opichals at seznam dot cz 2007-09-08 23:53 ` bangerth at dealii dot org 2007-09-17 11:36 ` opichals at seznam dot cz
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-32549-14781@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).