#1986: this compared to NULL in CarpetLib --------------------+------------------------------------------------------- Reporter: rhaas | Owner: eschnett Type: defect | Status: new Priority: minor | Milestone: Component: Carpet | Version: development version Keywords: | --------------------+------------------------------------------------------- I get {{{ /home/rhaas/Cactus/arrangements/Carpet/CarpetLib/src/gdata.cc: In member function ‘void gdata::copy_from(comm_state&, const gdata*, const ibbox&, const ibbox&, const islab*, int, int)’: /home/rhaas/Cactus/arrangements/Carpet/CarpetLib/src/gdata.cc:185:53: warning: nonnull argument ‘this’ compared to NULL [-Wnonnull-compare] int const order_space = (this ? cent : src->cent) == vertex_centered ? 1 : 0; ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ }}} which leads me to suspect that the compiler is allowed to assume this != NULL and will optimize out one half of the condition.