tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Tinycc-devel] [PATCH] Check for duplicate definitions of variables


From: Joshua Phillips
Subject: [Tinycc-devel] [PATCH] Check for duplicate definitions of variables
Date: Thu, 1 Nov 2007 16:34:40 +0000
User-agent: KMail/1.9.7

I was going to send this as a high-tech Mercurial bundle, but then I realized 
I'd transplanted the parent, so it was a bit difficult. Here's a low-tech 
patch file instead.

    Check for duplicate definitions of variables
    
    Added global "Sym *local_compound" which is a pointer into the local
    symbol stack to mark the start of the current compound statement.
    
    The following are valid:
    int a, a; /* in a global context */
    int a; { int a; } /* in a function */
    
    The following now throw errors:
    int a, a; /* in a function */
    void foo(int a, int a);
    enum { a, a };
    union { int a; int a; };
    struct { int a; struct { int a; }; };

Attachment: duplicate-defn.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]