This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/26300] [4.1 Regression] ICE in trunc_int_for_mode



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]