Opened 7 years ago

Closed 7 years ago

#131 closed defect (invalid)

warning: dereferencing type-punned pointer will break strict-aliasing rules

Reported by: judas_iscariote Owned by: moo
Priority: major Milestone: 1.2.2
Component: admin Version: 1.2.1
Keywords: gcc_4_2 Cc:
Application: PHP Version: 5_2
Other Exts: SAPI: Irrelevant
Probability: Always Blocked By:
Blocking:

Description

We have the following warnings with current GCC versions

/processor_real.c: In function 'xc_store_string_n':
./processor_real.c:170: warning: dereferencing type-punned pointer will break strict-aliasing rules
./processor_real.c: In function 'xc_calc_zval_ptr':
./processor_real.c:1043: warning: dereferencing type-punned pointer will break strict-aliasing rules
./processor_real.c: In function 'xc_store_zval_ptr':
./processor_real.c:3595: warning: dereferencing type-punned pointer will break strict-aliasing rules
./processor_real.c: In function 'xc_restore_zval_ptr':
./processor_real.c:6688: warning: dereferencing type-punned pointer will break strict-aliasing rules
./processor_real.c: In function 'xc_restore_zend_op_array':
./processor_real.c:8013: warning: dereferencing type-punned pointer will break strict-aliasing rules


usr/src/packages/BUILD/xcache-1.2.1.stable20070919/xcache.c: In function 'xc_cache_early_binding_class_cb':
/usr/src/packages/BUILD/xcache-1.2.1.stable20070919/xcache.c:826: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/src/packages/BUILD/xcache-1.2.1.stable20070919/xcache.c: In function 'xcache_admin_auth_check':
/usr/src/packages/BUILD/xcache-1.2.1.stable20070919/xcache.c:1612: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/src/packages/BUILD/xcache-1.2.1.stable20070919/xcache.c:1618: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/src/packages/BUILD/xcache-1.2.1.stable20070919/xcache.c:1625: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/src/packages/BUILD/xcache-1.2.1.stable20070919/xcache.c: In function 'xcache_signal_handler':

/usr/src/packages/BUILD/xcache-1.2.1.stable20070919/utils.c: In function 'xc_auto_global_callback':
/usr/src/packages/BUILD/xcache-1.2.1.stable20070919/utils.c:519: warning: dereferencing type-punned pointer will break strict-aliasing rules

/usr/src/packages/BUILD/xcache-1.2.1.stable20070919/coverager.c: In function 'xc_coverager_save_cov':
/usr/src/packages/BUILD/xcache-1.2.1.stable20070919/coverager.c:148: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/src/packages/BUILD/xcache-1.2.1.stable20070919/coverager.c:173: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/src/packages/BUILD/xcache-1.2.1.stable20070919/coverager.c:185: warning: ignoring return value of 'ftruncate', declared with attribute warn_unused_result
/usr/src/packages/BUILD/xcache-1.2.1.stable20070919/coverager.c:187: warning: ignoring return value of 'write', declared with attribute warn_unused_result
/usr/src/packages/BUILD/xcache-1.2.1.stable20070919/coverager.c: In function 'xc_coverager_clean':
/usr/src/packages/BUILD/xcache-1.2.1.stable20070919/coverager.c:211: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/src/packages/BUILD/xcache-1.2.1.stable20070919/coverager.c:219: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/src/packages/BUILD/xcache-1.2.1.stable20070919/coverager.c: In function 'xc_coverager_autodump':
/usr/src/packages/BUILD/xcache-1.2.1.stable20070919/coverager.c:282: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/src/packages/BUILD/xcache-1.2.1.stable20070919/coverager.c: In function 'xc_coverager_dump':
/usr/src/packages/BUILD/xcache-1.2.1.stable20070919/coverager.c:311: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/src/packages/BUILD/xcache-1.2.1.stable20070919/coverager.c:325: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/src/packages/BUILD/xcache-1.2.1.stable20070919/coverager.c: In function 'xc_coverager_get':
/usr/src/packages/BUILD/xcache-1.2.1.stable20070919/coverager.c:355: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/src/packages/BUILD/xcache-1.2.1.stable20070919/coverager.c:364: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/src/packages/BUILD/xcache-1.2.1.stable20070919/coverager.c: In function 'xc_coverager_add_hits':
/usr/src/packages/BUILD/xcache-1.2.1.stable20070919/coverager.c:379: warning: dereferencing type-punned pointer will break strict-aliasing rules

we either need to fix it or automatically add -fno-strict-aliasing to CFLAGS

Change History (1)

comment:1 Changed 7 years ago by moo

  • Resolution set to invalid
  • Status changed from new to closed

this warning is issued when compiling php too, mostly on calling zend_hash_find. not a problem in XCache unless someone tell me how to "fix" it.

Note: See TracTickets for help on using tickets.