未定義でしょ。禁じているならエラーになる筈。 問題の性質上、厳密に ISO C 規格に従って (未定義なしで) エンディアンを判別することは難しくない?
> If the value being stored in an object is accessed from > another object that overlaps in any way the storage of the > first object, then the overlap shall be exact and the two > objects shall have qualified or unqualified versions of a > compatible type; otherwise, the behavior is undefined.