[hackers] [scc] [cc1] Use NS_DUMMY instead of 0 || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Thu, 15 Dec 2016 13:39:09 +0100 (CET)

commit 24f5b053a44666a9fa66c8ed71cedb797b621b3d
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Wed Dec 14 14:58:42 2016 +0100
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Thu Dec 15 13:38:40 2016 +0100

    [cc1] Use NS_DUMMY instead of 0
    
    Symbols defined in the scope of a type name must not hide
    any symbol in any namespace, so the best solution is to
    use a non valid namespace. NS_DUMMY is a better representation
    than 0 for it.

diff --git a/cc1/cc1.h b/cc1/cc1.h
index 8f88d07..120c97e 100644
--- a/cc1/cc1.h
+++ b/cc1/cc1.h
_AT_@ -62,7 +62,8 @@ enum {
 
 /* namespaces */
 enum {
- NS_IDEN = 1,
+ NS_DUMMY,
+ NS_IDEN,
         NS_TAG,
         NS_LABEL,
         NS_CPP,
diff --git a/cc1/decl.c b/cc1/decl.c
index 960325e..a9a59ff 100644
--- a/cc1/decl.c
+++ b/cc1/decl.c
_AT_@ -924,5 +924,5 @@ fieldlist(Type *tp)
 Type *
 typename(void)
 {
- return dodcl(NOREP, type, 0, NULL)->type;
+ return dodcl(NOREP, type, NS_DUMMY, NULL)->type;
 }
Received on Thu Dec 15 2016 - 13:39:09 CET

This archive was generated by hypermail 2.3.0 : Thu Dec 15 2016 - 13:48:24 CET