On Wed, 2010-06-02 at 13:19 +0200, Per Jessen wrote:
Roger Oberholtzer wrote:
I have a question about a difference between gcc and g++ in the following:
typedef struct {
const char *CMD_SERVICE, *CMD_TRANSPORT;
} dPavueCnfg;
dPavueCnfg dConfig = {
.CMD_SERVICE = "DPcmd", .CMD_TRANSPORT = "tcp" };
This works with gcc (on Linux and MinGW). But it does not work in g++. So, is this a GNU C-only extension?
No, designated initializers belong to C99, but they're not part of C++.
D*mn. I am using a 3-rd party library that is c++, and so i am compiling with g++. I usually do not use it. Oh well. I will have to adapt. At least I know what this is called: designated initializers. They are a good thing IMHO. I thought they were GNU extensions. So if they are C99, other compilers might support them? As we have really extended our use of them, I was thinking we were effectively deciding that we were going to stick with GNU compilers. -- Roger Oberholtzer OPQ Systems / Ramböll RST Ramböll Sverige AB Krukmakargatan 21 P.O. Box 17009 SE-104 62 Stockholm, Sweden Office: Int +46 10-615 60 20 Mobile: Int +46 70-815 1696 -- To unsubscribe, e-mail: opensuse-programming+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-programming+help@opensuse.org