Quantcast
Channel: LabWindows/CVI topics
Viewing all articles
Browse latest Browse all 5339

Use of GNU statement expression extension

$
0
0

Hello, hello,

I'd like to rewrite some of my old side-effect macros in a more modern (C99/C11) way using compound statements, such as this:

#define MIN(x,y)    ({ __auto_type __x = (x); __auto_type __y = (y); __x < __y ? __x : __y; })

It compiles fine with gcc, but Clang used by CVI gives me the error mentioned in the title. Apparently, all I need to do is to add -Wno-gnu, but I don't see where I can add compiler-specific options.

I also tried #pragma clang diagnostic ignored "-Wno-gnu" without success


Viewing all articles
Browse latest Browse all 5339

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>