[cfe-commits] r124661 - in /cfe/trunk: include/clang/Basic/DiagnosticFrontendKinds.td include/clang/Basic/LangOptions.h include/clang/Driver/CC1Options.td include/clang/Driver/Options.td lib/AST/RecordLayoutBuilder.cpp lib/Driver/Tools.cpp lib/Fr

Carl Norum carl.norum at apple.com
Thu Feb 3 14:45:54 PST 2011

On Feb 3, 2011, at 2:33 PM, Daniel Dunbar wrote:
> Were the alignment requirementa of your project not satisfiable using
> attribute aligned? If possible, it seems more ideal to use that than
> to have a partially implemented feature in tree. This will be a source
> of confusion to anyone using the flag for it's more subtle behavioral
> changes.

Hi Daniel,

You're right that we could probably use attribute aligned.  The problem is that we have hundreds of structures in hundreds of source files, and we would need to check every one for correctness if we were to modify the source code.  Besides that, we need to keep the build working with MSVC in case we meet up with an insurmountable problem before having to ship some new products and have to switch back to building on Windows.  We also get large source code drops from vendors, which are going to assume the MSVC structure alignment behaviour, and modifying those drops and merging them with the source tree becomes much more complicated if we have to maintain the changes in source files.

I'm not opposed to changing the name of the flag if you think it's going to cause confusion, but the support for the behaviour we need was in gcc and what we need is now also in clang.  Whether a partial implementation is better or worse than no implementation is a matter for debate I guess.  Certainly not having to maintain local patches makes our toolchain maintenance a lot easier over here.

-- Carl

More information about the cfe-commits mailing list