Ethereal-cvs: [Ethereal-cvs] cvs commit: ethereal packet-gsm_map.c

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: guy@xxxxxxxxxxxx (Guy Harris)
Date: Wed, 17 Mar 2004 02:46:57 -0600 (CST)
guy         2004/03/17 02:46:57 CST

  Modified files:
    .                    packet-gsm_map.c 
  Log:
  Unfortunately, GCC 2.8.1 on x86/Solaris 7 doesn't do enough
  compile-time optimization; in particular, if you call
  GSM_MAP_PARAM_DISPLAY with a Gtag argument of GSM_MAP_P_NONE, the
  compiler does figure out that it only need generate code for the first
  branch for the first if in that macro, and it sort of seems to
  understand that _param_fcn is guaranteed to be null, but it doesn't
  optimize out the test and the branch for _param_fcn not being null - it
  does, however, generate a call to location 0, which, when you compile as
  position-independent code, the assembler refuses to assemble.
  
  Therefore, we put into the test for _param_fcn being null an additional
  test for Ga1 being GSM_MAP_P_NONE, which at least manages to get the
  code through the compiler.
  
  Revision  Changes    Path
  1.8       +2 -2      ethereal/packet-gsm_map.c