> At that point, #pragma pack is kind of pointless, because it does nothing.
...the whole point of the thread is to make the content of padding bytes explicitly defined, and this is one way to do it (the other solution that came up is to use a compiler-specific builtin to zero the padding bytes, not yet supported by clang though)
@floooh @lritter @greenmoonmoon Yeah, surrounding the structs you want this on with:
#pragma pack(push, 1)
// structs
#pragma pack(pop)
That's right, right? Been a while since I learnt about that.
@Lapizistik #PRAGMA DO_WHAT_I_MEAN
Funktioniert bei mir schon seit Jahren 😂
@funkylab it’s really to do with it not being standardised more than anything else. Like what is the expectation of preprocessing the following file lol.h
#ifndef foo
#define foo
#else
#pragma once
#endif
#include "lol.h"
Yo
Is it a single “Yo” or two lines of “Yo”?
If it was defined that it needed to be the first thing in a file following whitespace, I think i’f be fine with it.