diff options
author | JinWang An <jinwang.an@samsung.com> | 2021-12-28 12:58:57 +0900 |
---|---|---|
committer | JinWang An <jinwang.an@samsung.com> | 2021-12-28 12:58:57 +0900 |
commit | 253a2fc5d9cd390d78a209f08af8ae31b13c44d8 (patch) | |
tree | 5ec9aa82542909ecfc0859277d941528857a59b7 /lib/ignore-value.h | |
parent | 931b01b091932a1f796c23379ea32abb68bd5895 (diff) | |
download | m4-253a2fc5d9cd390d78a209f08af8ae31b13c44d8.tar.gz m4-253a2fc5d9cd390d78a209f08af8ae31b13c44d8.tar.bz2 m4-253a2fc5d9cd390d78a209f08af8ae31b13c44d8.zip |
Imported Upstream version 1.4.18upstream/1.4.18
Diffstat (limited to 'lib/ignore-value.h')
-rw-r--r-- | lib/ignore-value.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/ignore-value.h b/lib/ignore-value.h index ebd6bf4..6713d96 100644 --- a/lib/ignore-value.h +++ b/lib/ignore-value.h @@ -1,6 +1,6 @@ -/* ignore a function return without a compiler warning +/* ignore a function return without a compiler warning. -*- coding: utf-8 -*- - Copyright (C) 2008-2013 Free Software Foundation, Inc. + Copyright (C) 2008-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -35,9 +35,11 @@ #ifndef _GL_IGNORE_VALUE_H #define _GL_IGNORE_VALUE_H -/* The __attribute__((__warn_unused_result__)) feature - is available in gcc versions 3.4 and newer, - while the typeof feature has been available since 2.7 at least. */ +/* Normally casting an expression to void discards its value, but GCC + versions 3.4 and newer have __attribute__ ((__warn_unused_result__)) + which may cause unwanted diagnostics in that case. Use __typeof__ + and __extension__ to work around the problem, if the workaround is + known to be needed. */ #if 3 < __GNUC__ + (4 <= __GNUC_MINOR__) # define ignore_value(x) \ (__extension__ ({ __typeof__ (x) __x = (x); (void) __x; })) |