public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/14244] New: Regression failure with v3.3: uninstantiated template code not ignored
@ 2004-02-22 18:17 s_gccbugzilla at nedprod dot com
  2004-02-22 18:20 ` [Bug c++/14244] " s_gccbugzilla at nedprod dot com
  2004-02-23  0:57 ` pinskia at gcc dot gnu dot org
  0 siblings, 2 replies; 3+ messages in thread
From: s_gccbugzilla at nedprod dot com @ 2004-02-22 18:17 UTC (permalink / raw)
  To: gcc-bugs

Default options, GCC v3.4 CVS 20040218.

The below compiles on v3.3 of GCC and MSVC. I believe the standard says that 
code not instantiated should not be compiled except for syntax checking.

/* Test for error throwing bug */
#include <stdio.h>

template<bool error> struct Foo
{
	enum { value=ERROR_Not_Valid };
};
template<> struct Foo<true>
{
	enum { value=1 };
};

int main(void)
{
	printf("Val=%d\n", Foo<true>::value); 
}

Cheers,
Niall

-- 
           Summary: Regression failure with v3.3: uninstantiated template
                    code not ignored
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: critical
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: s_gccbugzilla at nedprod dot com
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14244


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/14244] Regression failure with v3.3: uninstantiated template code not ignored
  2004-02-22 18:17 [Bug c++/14244] New: Regression failure with v3.3: uninstantiated template code not ignored s_gccbugzilla at nedprod dot com
@ 2004-02-22 18:20 ` s_gccbugzilla at nedprod dot com
  2004-02-23  0:57 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: s_gccbugzilla at nedprod dot com @ 2004-02-22 18:20 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |rejects-valid


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14244


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/14244] Regression failure with v3.3: uninstantiated template code not ignored
  2004-02-22 18:17 [Bug c++/14244] New: Regression failure with v3.3: uninstantiated template code not ignored s_gccbugzilla at nedprod dot com
  2004-02-22 18:20 ` [Bug c++/14244] " s_gccbugzilla at nedprod dot com
@ 2004-02-23  0:57 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-23  0:57 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-02-23 00:57 -------
No this is not a bug, a template still needs to go through the normal lookup at the time of declaration if 
the object is type or value dependent (on the template parameters).

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14244


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-02-23  0:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-22 18:17 [Bug c++/14244] New: Regression failure with v3.3: uninstantiated template code not ignored s_gccbugzilla at nedprod dot com
2004-02-22 18:20 ` [Bug c++/14244] " s_gccbugzilla at nedprod dot com
2004-02-23  0:57 ` pinskia at gcc dot gnu dot 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).