Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Code::Blocks, Scintilla and Fedora
Jenna:
--- Quote from: Loaden on November 08, 2010, 11:50:40 am ---
--- Quote from: MortenMacFly on November 08, 2010, 11:30:21 am ---@Jens,Loaden: please keep in mind not to touch the wxscintilla component too much - I've have quite a lot changes pending from my side, including an update of scintilla. So please don't cause too much conflicts (project files are OK of course).
--- End quote ---
Copy that.
Have another question, why we need hack this code from:
--- Code: ---SCNotification scn = {0};
--- End code ---
to:
--- Code: ---/* C::B begin */
SCNotification scn; memset((void*)&scn, 0, sizeof(scn));
/* C::B end */
--- End code ---
:?
--- End quote ---
To avoid build-warnings.
Can you test my new patch, works for me on XP SP3, wx2.8.10 and TDM gcc 4.5.0 (just for the core project-file at the moment).
MortenMacFly:
--- Quote from: Loaden on November 08, 2010, 11:50:40 am ---Have another question, why we need hack this code from:
--- Code: ---SCNotification scn = {0};
--- End code ---
to:
--- Code: ---/* C::B begin */
SCNotification scn; memset((void*)&scn, 0, sizeof(scn));
/* C::B end */
--- End code ---
:?
--- End quote ---
Because it is technically more correct. This is a structure and if you only set the first value to zero, the other values may still be invalid on initialisation (platform / compiler dependent). Why are you asking? Is this causing trouble?
oBFusCATed:
--- Quote from: MortenMacFly on November 08, 2010, 02:11:17 pm ---...This is a structure and if you only set the first value to zero, the other values may still be invalid on initialisation (platform / compiler dependent).
--- End quote ---
Hm, C++ standard says that the unspecified members are initialized with zero (If I remember correctly).
Which compiler fails to compile this code (={0}) correctly?
Also memset should be used on POD only structs, probably =0 will error if used with non-POD struct.
Loaden:
--- Quote from: oBFusCATed on November 08, 2010, 02:57:13 pm ---
--- Quote from: MortenMacFly on November 08, 2010, 02:11:17 pm ---...This is a structure and if you only set the first value to zero, the other values may still be invalid on initialisation (platform / compiler dependent).
--- End quote ---
Hm, C++ standard says that the unspecified members are initialized with zero (If I remember correctly).
--- End quote ---
I can sure it, so, I think it maybe not needed to hack.
Jenna:
--- Quote from: Loaden on November 08, 2010, 03:37:55 pm ---
--- Quote from: oBFusCATed on November 08, 2010, 02:57:13 pm ---
--- Quote from: MortenMacFly on November 08, 2010, 02:11:17 pm ---...This is a structure and if you only set the first value to zero, the other values may still be invalid on initialisation (platform / compiler dependent).
--- End quote ---
Hm, C++ standard says that the unspecified members are initialized with zero (If I remember correctly).
--- End quote ---
I can sure it, so, I think it maybe not needed to hack.
--- End quote ---
But it should be
--- Code: ---SCNotification scn = {{0}};
--- End code ---
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version