This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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]

Re: [PATCH] debug/tst-longjmp_chk2: Make signal handler more conservative [BZ #20248]


Florian Weimer wrote:
I brought this up on the GCC list.  But I don't think there will be any movement
unless I submit a patch â

Florian

For what it's worth, Gnulib uses a different approach in its ignore-value module. To ignore the value returned by (say) fchown, one writes this:

  ignore_value (fchown (fd, 0, 0));

and the ignore_value macro is defined this way:

  #if 3 < __GNUC__ + (4 <= __GNUC_MINOR__)
  # define ignore_value(x) \
      (__extension__ ({ __typeof__ (x) __x = (x); (void) __x; }))
  #else
  # define ignore_value(x) ((void) (x))
  #endif


I never understood why GCC generated warnings for expressions cast to void, as that was the longstanding idiom for "I know this returns a value, and I don't want it."


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