[cfe-commits] [PATCH] Microsoft extension: "_alignof" alias for "__alignof"

Will Wilson will at indefiant.com
Mon May 7 10:17:12 PDT 2012


>> > Looks fine as far as I can tell. Should we support __builtin_alignof in
>> > ms
>> > mode as well?
>>
>> Do you mean as an additional keyword alias of __alignof?
>
>
> Yes.

Okay, I've updated the patch with the test-case to add support for
"__builtin_alignof". All tests pass locally.

According to http://www.geoffchappell.com/studies/msvc/cl/c1xx/warnings/c4932.htm
there is a single-underscore version "_builtin_alignof" that's allowed
in MSVC if /Ze is specified. That said, in VS2010 intellisense doesn't
even seem to recognise this version, so I've only added the double
underscore version for now as it seems even MS are reticent about
supporting the more exotic form.

This should also solve: http://llvm.org/bugs/show_bug.cgi?id=12648

Cheers,
Will.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: _alignof_token_alias_ms_ext_2.diff
Type: application/octet-stream
Size: 3250 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120507/1798bd94/attachment.obj>


More information about the cfe-commits mailing list