[Bug c++/32549] Wrong template instance resolution among multiple object files.

2007-09-17 Thread opichals at seznam dot cz
--- Comment #5 from opichals at seznam dot cz 2007-09-17 11:35 --- Yes, I have checked the ODR definition and it is really the fact that the code violates that. Thank you for your explanations. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32549

[Bug c++/32549] Wrong template instance resolution among multiple object files.

2007-09-08 Thread bangerth at dealii dot org
--- Comment #4 from bangerth at dealii dot org 2007-09-08 23:52 --- The code is definitely invalid. The two typedefs declare two types with external linkage. This is an ODR violation making the code invalid. The standard doesn't require compilers to produce an error for a very good reaso

[Bug c++/32549] Wrong template instance resolution among multiple object files.

2007-06-30 Thread opichals at seznam dot cz
--- Comment #3 from opichals at seznam dot cz 2007-06-30 15:05 --- I am not sure about the standard wording. But logically typedefs local to a .cpp file should stay local to that file. They in fact are. However the template instances are not. If it should not be that way then the compil

[Bug c++/32549] Wrong template instance resolution among multiple object files.

2007-06-29 Thread pinskia at gcc dot gnu dot org
--- Comment #2 from pinskia at gcc dot gnu dot org 2007-06-29 19:45 --- I don't think this is a bug. So we have in one TU: typedef struct { char x[10]; } Argument; And in the other: typedef struct { char x[20]; } Argument; --- cut --- IIRC from my

[Bug c++/32549] Wrong template instance resolution among multiple object files.

2007-06-29 Thread opichals at seznam dot cz
--- Comment #1 from opichals at seznam dot cz 2007-06-29 17:45 --- Created an attachment (id=13805) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13805&action=view) Reproduction code and Makefile printing out results of the test The log files gcc-4.1.0.make.log and gcc-3.4.6.make.