[llvm-bugs] [Bug 28094] New: Unlike MSVC, __pragma(pack(pop)) cannot be placed before semicolon in struct declaration
via llvm-bugs
llvm-bugs at lists.llvm.org
Sun Jun 12 06:15:34 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=28094
Bug ID: 28094
Summary: Unlike MSVC, __pragma(pack(pop)) cannot be placed
before semicolon in struct declaration
Product: clang
Version: 3.8
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: jibz-llvmbugs at stdip.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
MSVC (I only checked 2015) allows __pragma(pack(pop)) to be placed
both before and after the semicolon following a struct declaration.
It seems Clang only allows it after. Example:
__pragma(pack(push, 1)) struct foo { int a; } __pragma(pack(pop));
compiles with MSVC, but Clang gives:
foo.c(1,46) : error: expected ';' after struct
__pragma(pack(push, 1)) struct foo { int a; } __pragma(pack(pop));
^
;
1 error generated.
There are some codebases that uses macros that expand to this
version.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160612/bc37842f/attachment.html>
More information about the llvm-bugs
mailing list