[cfe-dev] Decls are not synonyms for the symbols they represent

steve naroff snaroff at apple.com
Wed Sep 17 07:15:06 PDT 2008


On Sep 16, 2008, at 6:57 PM, Ted Kremenek wrote:

>
> On Sep 16, 2008, at 3:30 PM, steve naroff wrote:
>
>> Ted,
>>
>> I couldn't get clang to crash on the code you referenced below...
>>
>> [steve-naroffs-imac-2:llvm/tools/clang] snaroff% cat xx.c
>> void f (void)
>> {
>>  extern double *p;
>>  extern double *p;
>> }
>>
>> [steve-naroffs-imac-2:llvm/tools/clang] snaroff% ../../Debug/bin/ 
>> clang xx.c
>> xx.c:4:18: error: redefinition of 'p'
>>  extern double *p;
>>                 ^
>> xx.c:3:18: error: previous definition is here
>>  extern double *p;
>>                 ^
>> 2 diagnostics generated.
>>
>> Do I need to run clang with any special switches?
>>
>> snaroff
>>
>
> Hi Steve,
>
> Sorry for the confusion.  I think I meant "incorrect rejects"  
> instead of "crashes."  gcc eats that input just fine.
>

Ted,

I just fixed http://llvm.org/bugs/show_bug.cgi?id=2760. This was a  
trivial bug in MergeVarDecl().

 From my perspective, this bug doesn't suggest we need any unique  
"entity" for the variable (which was the context of your original  
email).

snaroff

> Ted




More information about the cfe-dev mailing list