Re: RFC: g++ compiler flag usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Marcel,

>i do not want to do a compilers work...

C++ in general (or GCC's g++ in particular) do not provide FD_SET.

FD_SET is provided by the system.

>...so i think if there isn't a applicable of FD_SET(...,...) in c++ and you are forced to use c functions - the compiler should be
a) able to detect it on his own, or
b) let the coder declare critic sections

Since the compiler does not provide FD_SET, I do not think (a) is a reasonable expectation.

I've already provided you with a suggestion for how to utilize FD_SET in a C file, and then call that extern "C" routine in your C++ program.  That C thunk layers acts as a critical section, for your (b) expectation.

If you really want to use C++, then you could put the FD_SET in a C++ source file that is compiled with different flags from the rest of your source code.  That separate source file on its own acts as a critical section.

Sincerely,
--Eljay


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux