------- Comment #4 from jakub at gcc dot gnu dot org 2006-02-15 14:55 ------- Well, undefined behavior only if you reach it. The original code looked like: if (((type) == (Qnothing))) return IMAGE_NOTHING; if (((type) == (Qtext))) return IMAGE_TEXT; if (((type) == (Qmono_pixmap))) return IMAGE_MONO_PIXMAP; if (((type) == (Qcolor_pixmap))) return IMAGE_COLOR_PIXMAP; if (((type) == (Qpointer))) return IMAGE_POINTER; if (((type) == (Qsubwindow))) return IMAGE_SUBWINDOW; if (((type) == (Qwidget))) return IMAGE_WIDGET;
maybe_signal_simple_error("Invalid image-instance type", type, Qimage, errb); return IMAGE_UNKNOWN; where IMAGE_UNKNOWN is 0, guess the authors just assume this will never happen. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26300