diff options
author | Alan Modra <amodra@gmail.com> | 2018-05-02 19:21:45 +0930 |
---|---|---|
committer | Alan Modra <amodra@gcc.gnu.org> | 2018-05-02 19:21:45 +0930 |
commit | 85b3bb6d57c00993d2692c75cdd563945438da24 (patch) | |
tree | d74f10ef3706883d351a44f381d7d0ad39e94f68 /include | |
parent | b1750618e49466889001e0786019bb1f32df15e9 (diff) | |
download | gcc-85b3bb6d57c00993d2692c75cdd563945438da24.tar.gz |
ansidecl.h (ATTRIBUTE_NONSTRING): Define.
ATTRIBUTE_NONSTRING
* ansidecl.h (ATTRIBUTE_NONSTRING): Define.
From-SVN: r259832
Diffstat (limited to 'include')
-rw-r--r-- | include/ChangeLog | 4 | ||||
-rw-r--r-- | include/ansidecl.h | 9 |
2 files changed, 13 insertions, 0 deletions
diff --git a/include/ChangeLog b/include/ChangeLog index f29ce63cfc9..793ade50483 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,7 @@ +2018-05-02 Alan Modra <amodra@gmail.com> + + * ansidecl.h (ATTRIBUTE_NONSTRING): Define. + 2018-05-01 Sriraman Tallam <tmsriram@google.com> * plugin-api.h: Add plugin API to get the list of wrap diff --git a/include/ansidecl.h b/include/ansidecl.h index c11daffedb9..406473ca9e5 100644 --- a/include/ansidecl.h +++ b/include/ansidecl.h @@ -283,6 +283,15 @@ So instead we use the macro below and test it against specific values. */ # endif /* GNUC >= 4.9 */ #endif /* ATTRIBUTE_NO_SANITIZE_UNDEFINED */ +/* Attribute 'nonstring' was valid as of gcc 8. */ +#ifndef ATTRIBUTE_NONSTRING +# if GCC_VERSION >= 8000 +# define ATTRIBUTE_NONSTRING __attribute__ ((__nonstring__)) +# else +# define ATTRIBUTE_NONSTRING +# endif +#endif + /* We use __extension__ in some places to suppress -pedantic warnings about GCC extensions. This feature didn't work properly before gcc 2.8. */ |