xref: /netbsd-src/external/bsd/pcc/dist/pcc/cc/cxxcom/cxxdefs.h (revision 954218c13a9b2d2178ae51145e16a23abd5afadb)
1 
2 
3 enum { NM_NEW, NM_NWA, NM_DEL, NM_DLA, NM_NORMAL, };
4 
5 enum { LINK_DEF, LINK_C }; /* linkage definitions */
6 extern int elnk;
7 #define	SCLINK	00020	/* for symtab */
8 
9 extern int cppdebug;
10 
11 /* spole is symbol at base, nscur is where we are in the stack. */
12 extern struct symtab *spole, *nscur;
13 
14 /* insert a symbol into this something */
15 #define	INSSYM(sp) (sp->snext = nscur->sup, nscur->sup = sp, sp->sdown = nscur)
16 #define	POPSYM()   (nscur = nscur->sdown)
17 
18 /* C++-specific node types */
19 #define		CONST_CAST	(MAXOP+35)
20 #define		DYN_CAST	(MAXOP+36)
21 #define		REINT_CAST	(MAXOP+37)
22 #define		STATIC_CAST	(MAXOP+38)
23 #define		NEWKW		(MAXOP+39)
24 #define		DELETE		(MAXOP+40)
25 #define		NMLIST		(MAXOP+41)
26 
27 /* C++-specific symtab types */
28 #define	CLNAME	(MAXSTCL+1)	/* symtab entry is class */
29 #define	NSPACE	(MAXSTCL+2)	/* symtab entry is namespace */
30 
31 char *decoratename(struct symtab *sp, int type);
32 NODE *cxx_new(NODE *p);
33 NODE *cxx_delete(NODE *p, int del);
34 void dclns(NODE *attr, char *n);
35 struct symtab *cxxlookup(NODE *p, int declare);
36 void cxxsetname(struct symtab *sp);
37 void cxxmember(struct symtab *sp);
38 struct symtab *cxxstrvar(struct symtab *so);
39 struct symtab *cxxdclstr(char *n);
40 struct symtab *cxxftnfind(NODE *p, int flags);
41 struct symtab *cxxdeclvar(NODE *p);
42 void symtree(void);
43 NODE *cxxrstruct(int soru, NODE *attr, NODE *t, char *tag);
44 NODE *cxxmatchftn(NODE *, NODE *);
45 NODE *cxxaddhidden(NODE *, NODE *);
46 NODE *cxxstructref(NODE *p, int f, char *name);
47