diff options
author | Michael Dickens <michael.dickens@ettus.com> | 2015-03-07 11:15:10 -0500 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2015-03-11 15:33:17 -0700 |
commit | a4eee83b82a5f57b22c092e5f9dc825baf8fe6dd (patch) | |
tree | 266b66c67c5e6dfaaa1fcd0d77a2299574770896 /host/include | |
parent | cc1bb014033b531e5cff1523eb3c3f925aa576f6 (diff) | |
download | uhd-a4eee83b82a5f57b22c092e5f9dc825baf8fe6dd.tar.gz uhd-a4eee83b82a5f57b22c092e5f9dc825baf8fe6dd.tar.bz2 uhd-a4eee83b82a5f57b22c092e5f9dc825baf8fe6dd.zip |
nirio: hopefully fix #pragma declarations; "push" and "pop" introduced in GCC 4.6; works with all clang.
Diffstat (limited to 'host/include')
-rw-r--r-- | host/include/uhd/transport/nirio/nirio_fifo.ipp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/host/include/uhd/transport/nirio/nirio_fifo.ipp b/host/include/uhd/transport/nirio/nirio_fifo.ipp index ca6486e30..49ce43888 100644 --- a/host/include/uhd/transport/nirio/nirio_fifo.ipp +++ b/host/include/uhd/transport/nirio/nirio_fifo.ipp @@ -15,9 +15,11 @@ // along with this program. If not, see <http://www.gnu.org/licenses/>. // -#ifdef __clang__ - #pragma GCC diagnostic push ignored "-Wmissing-field-initializers" -#elif defined(__GNUC__) +// "push" and "pop" introduced in GCC 4.6; works with all clang +#if defined(__clang__) || defined(__GNUC__) && (__GNUC__ > 3) && (__GNUC_MINOR__ > 5) + #pragma GCC diagnostic push +#endif +#if defined(__clang__) || defined(__GNUC__) #pragma GCC diagnostic ignored "-Wmissing-field-initializers" #endif @@ -375,6 +377,6 @@ inline datatype_info_t nirio_fifo<uint64_t>::_get_datatype_info() return datatype_info_t(RIO_SCALAR_TYPE_UQ, 8); } -#ifdef __GNUC__ +#if defined(__clang__) || defined(__GNUC__) && (__GNUC__ > 3) && (__GNUC_MINOR__ > 5) #pragma GCC diagnostic pop #endif |