On Sun, Sep 9, 2012 at 3:55 AM, Chandler Carruth <[email protected]>wrote:

> On Sat, Sep 8, 2012 at 6:10 PM, Douglas Gregor <[email protected]> wrote:
>
>> Sent from my iPhone
>>
>> On Sep 7, 2012, at 6:44 PM, Alexander Kornienko <[email protected]>
>> wrote:
>>
>> > Author: alexfh
>> > Date: Fri Sep  7 17:44:34 2012
>> > New Revision: 163429
>> >
>> > URL: http://llvm.org/viewvc/llvm-project?rev=163429&view=rev
>> > Log:
>> > Fixed http://llvm.org/bugs/show_bug.cgi?id=13777
>> >
>> > Modified:
>> >    cfe/trunk/tools/clang-check/ClangCheck.cpp
>> >
>> > Modified: cfe/trunk/tools/clang-check/ClangCheck.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-check/ClangCheck.cpp?rev=163429&r1=163428&r2=163429&view=diff
>> >
>> ==============================================================================
>> > --- cfe/trunk/tools/clang-check/ClangCheck.cpp (original)
>> > +++ cfe/trunk/tools/clang-check/ClangCheck.cpp Fri Sep  7 17:44:34 2012
>> > @@ -58,7 +58,9 @@
>> >     "ast-dump-filter",
>> >     cl::desc(Options->getOptionHelpText(options::OPT_ast_dump_filter)));
>> >
>> > -namespace {
>> > +// Anonymous namespace here causes problems with gcc <= 4.4 on MacOS:
>> > +// http://llvm.org/bugs/show_bug.cgi?id=13777
>> > +// namespace {
>>
>> How about just putting it in the clang namespace? At the very least,
>> please delete the commented-out lines.
>>
>
> Agreed on both fronts. Also, bugs are usually cited just as "PR13777", and
> almost never cited in the source code, but rather in the test case itself.
>
> That said, is this really the necessary solution? There are a lot of
> template arguments defined in an anonymous namespace within the codebase
> already. How do they work without problems?
>
You suggest that I start figuring out "how do they work without problems"?
Do you consider it useful to spend more time dealing with a stupid bug in
4+ year-old version of GCC?

I feel like this is an ODR violation waiting to happen unless we put it in
> an anonymous namespace the way it should be...
>
Or should I revert it and leave LLVM broken in MacPorts for Snow Leopard or
whatever was broken before this patch?

Or I can try to make the name of this class as unique as possible while
retaining it readable and meaningful (say,
clang::clang_check::ClangCheckSpecificActionFactory), and return to this
problem once gcc 4.2 (or even 4.4) is completely and irreversibly dead
(say, in 15 years).

-Chandler
>


-- 
Regards,
Alex
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to