From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <52F12442.3040301@xenomai.org> Date: Tue, 04 Feb 2014 18:32:50 +0100 From: Gilles Chanteperdrix MIME-Version: 1.0 References: <52F1172B.2080500@xenomai.org> <52F11F94.9000309@siemens.com> <52F1231A.7080603@xenomai.org> In-Reply-To: <52F1231A.7080603@xenomai.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Xenomai] [Xenomai-git] Jan Kiszka : alchemy: Replace static variable no_alchemy_task with macro List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Philippe Gerum Cc: xenomai-git@xenomai.org, Jan Kiszka , xenomai@xenomai.org On 02/04/2014 06:27 PM, Philippe Gerum wrote: > If g++ chokes on the initializer part because it is outdated, then using > old-fashioned ones may be an option. Actually, I find macroizing this > definition quite bad. > > static const RT_TASK no_alchemy_task = { > - .handle = 0, > - .thread = 0 > + handle: 0, > + thread: 0 > }; No, the previous version is better, it is standard compliant C and C++, the second version is a gcc extension, which works only when compiling C, if I remember correctly. -- Gilles.