[coreboot-gerrit] Change in coreboot[master]: xcompile: silence clang when referencing packed structs' mem...

Philippe Mathieu-Daudé (Code Review) gerrit at coreboot.org
Fri May 12 17:53:19 CEST 2017


Philippe Mathieu-Daudé has posted comments on this change. ( https://review.coreboot.org/19659 )

Change subject: xcompile: silence clang when referencing packed structs' members
......................................................................


Patch Set 1: Code-Review-1

> multiple locations, and it's bogus everywhere: if we use packed
 > structs, it's because we expect a certain memory layout (and I
 > know, modern C compilers needn't adhere to any reasonable
 > interpretation of that). If we refer to any such element, it might
 > not be aligned, we know, we don't care.

I agree x86 and armv7 don't care (on armv7 as long as it does not cross memory map boundaries), however armv4 and mips do care. I don't know about riscv/power. That's why I wonder where clang reported this warning. Maybe it worths disabling it checking $SUBARCH not matching arm-armv4 and mips*-mips?

-- 
To view, visit https://review.coreboot.org/19659
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I5400f50d8b5b462270c700f7ff90d9d517278e71
Gerrit-PatchSet: 1
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Owner: Patrick Georgi <pgeorgi at google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi at google.com>
Gerrit-Reviewer: Paul Menzel <paulepanter at users.sourceforge.net>
Gerrit-Reviewer: Philippe Mathieu-Daudé <philippe.mathieu.daude at gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply at coreboot.org>
Gerrit-HasComments: No



More information about the coreboot-gerrit mailing list