Thread (3 messages) 3 messages, 3 authors, 2012-07-27

Re: [PATCH] bluetooth.h: fix compile issue when using in C++

From: Markus Rathgeb <hidden>
Date: 2012-03-05 14:53:19

2012/3/5 Patrick Ohly [off-list ref]:
I'm fine with using __typeof__ instead of typeof. I verified that g++
4.6.2 and clang++ 3.0 grok __typeof__, with and without -std=c++0x. I
also checked that gcc accepts it without -std, with -std=gnu89, and with
-std=c99. It rejects the header file with -std=c89 because of the inline
keyword.
The gcc documentation states also this for the typeof C extension:

"If you are writing a header file that must work when included in ISO
C programs, write __typeof__ instead of typeof."

Source: http://gcc.gnu.org/onlinedocs/gcc/Typeof.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help