bug repport

Martin v. Loewis martin@mira.isdn.cs.tu-berlin.de
Wed Jun 30 23:07:00 GMT 1999


> The problem is (it's not really a bug but it could conduct to) that
> (probably because of the optimisation) the compiler put the string ("my
> string") in memory only one time. But the string is use 2 times in the cpp
> files. It conduct to succes on the if test. This could really cause bugs
> in bigger programs.

This is not a bug. It is perfectly OK for a compiler to avoid
duplication of strings, and gcc has done so for years. Also, this
cannot cause bugs in bugger programs - programs relying on string
literals being different are incorrect.

Regards,
Martin



More information about the Gcc-bugs mailing list