Click here to Skip to main content
15,888,351 members

The Weird and The Wonderful

   

The Weird and The Wonderful forum is a place to post Coding Horrors, Worst Practices, and the occasional flash of brilliance.

We all come across code that simply boggles the mind. Lazy kludges, embarrassing mistakes, horrid workarounds and developers just not quite getting it. And then somedays we come across - or write - the truly sublime.

Post your Best, your worst, and your most interesting. But please - no programming questions . This forum is purely for amusement and discussions on code snippets. All actual programming questions will be removed.

 
GeneralRe: Misaligned elephants Pin
Sentenryu24-Jul-13 1:18
Sentenryu24-Jul-13 1:18 
GeneralRe: Misaligned elephants Pin
Matthew Faithfull24-Jul-13 1:23
Matthew Faithfull24-Jul-13 1:23 
GeneralRe: Misaligned elephants Pin
RafagaX24-Jul-13 4:41
professionalRafagaX24-Jul-13 4:41 
GeneralRe: Misaligned elephants Pin
Sentenryu24-Jul-13 6:08
Sentenryu24-Jul-13 6:08 
GeneralRe: Misaligned elephants Pin
BiggerDon24-Jul-13 2:15
BiggerDon24-Jul-13 2:15 
GeneralRe: Misaligned elephants Pin
Gary Wheeler24-Jul-13 0:13
Gary Wheeler24-Jul-13 0:13 
GeneralRe: Misaligned elephants Pin
YvesDaoust23-Jul-13 22:51
YvesDaoust23-Jul-13 22:51 
GeneralRe: Misaligned elephants Pin
Matthew Faithfull23-Jul-13 23:10
Matthew Faithfull23-Jul-13 23:10 
YvesDaoust wrote:
Could it be a struct member alignment option silently set in a preceding header
file


I suspect it might be just that, but leaking from a Windows header. Including <windows.h> pulls in <string.h> which in this case is a project header not a system header. My guess is that the string support code is being included in the middle of a windows header section that for some reason has different alignment options. Tracking it down or doing anything about it would be rather difficult though.
I've worked round this one but I'll be on the lookout next time and also need to get pragma pack support into my Compiler support library as soon as I can.
"The secret of happiness is freedom, and the secret of freedom, courage."
Thucydides (B.C. 460-400)

GeneralRe: Misaligned elephants Pin
Ralph Little24-Jul-13 6:32
Ralph Little24-Jul-13 6:32 
GeneralRe: Misaligned elephants Pin
Member 460889824-Jul-13 10:02
Member 460889824-Jul-13 10:02 
GeneralRe: Misaligned elephants Pin
SortaCore24-Jul-13 0:04
SortaCore24-Jul-13 0:04 
GeneralRe: Misaligned elephants Pin
rbocquier24-Jul-13 0:39
rbocquier24-Jul-13 0:39 
GeneralRe: Misaligned elephants Pin
Matthew Faithfull24-Jul-13 0:53
Matthew Faithfull24-Jul-13 0:53 
GeneralRe: Misaligned elephants Pin
Stuart Dootson24-Jul-13 5:18
professionalStuart Dootson24-Jul-13 5:18 
GeneralRe: Misaligned elephants Pin
Matthew Faithfull24-Jul-13 5:24
Matthew Faithfull24-Jul-13 5:24 
GeneralRe: Misaligned elephants Pin
jschell24-Jul-13 9:26
jschell24-Jul-13 9:26 
GeneralMessage Automatically Removed Pin
Brisingr Aerowing19-Jul-13 6:46
professionalBrisingr Aerowing19-Jul-13 6:46 
GeneralRe: Extension Methods Pin
Andrew Rissing19-Jul-13 7:06
Andrew Rissing19-Jul-13 7:06 
GeneralRe: Extension Methods Pin
Richard Deeming19-Jul-13 7:20
mveRichard Deeming19-Jul-13 7:20 
GeneralRe: Extension Methods Pin
Gary Wheeler19-Jul-13 7:21
Gary Wheeler19-Jul-13 7:21 
GeneralRe: Extension Methods Pin
TnTinMn19-Jul-13 8:00
TnTinMn19-Jul-13 8:00 
GeneralRe: Extension Methods Pin
Lutosław19-Jul-13 8:08
Lutosław19-Jul-13 8:08 
GeneralRe: Extension Methods Pin
Richard Deeming19-Jul-13 8:55
mveRichard Deeming19-Jul-13 8:55 
GeneralRe: Extension Methods Pin
Lutosław19-Jul-13 9:06
Lutosław19-Jul-13 9:06 
GeneralRe: Extension Methods Pin
PIEBALDconsult19-Jul-13 8:09
mvePIEBALDconsult19-Jul-13 8:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.