summaryrefslogtreecommitdiff
path: root/gcc/c-decl.c
diff options
context:
space:
mode:
authorneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2002-05-25 22:01:55 +0000
committerneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2002-05-25 22:01:55 +0000
commit90cc7820c1f167a58ff381a18ec292405e4c9db4 (patch)
treec375aca387e79081a05e56f6cd9afddf5585f625 /gcc/c-decl.c
parent428d04ecd254359f5b89024ff8359e9fce94c4d5 (diff)
downloadgcc-90cc7820c1f167a58ff381a18ec292405e4c9db4.tar.gz
* Makefile.in (C_COMMON_H): Fix.
Update other targets. * c-common.c: Don't include c-lex.h. (builtin_define_with_value): Make static and prototype. (builtin_define_std): Move from c-lex.h. * c-common.h (init_c_lex): Move from c-lex.h. * c-decl.c: Don't include c-lex.h. (make_pointer_declarator): Move from c-parse.in. * c-lex.c: Don't include c-lex.h. * c-lex.h: Remove. * c-parse.in: Don't include c-lex.h; include c-pragma.h. (make_pointer_declarator): Move to c-decl.c. * c-pragma.c: Don't include c-lex.h. * c-pragma.h (yydebug, YYDEBUG, parse_in, c_lex): Move from c-lex.h. * c-tree.h (make_pointer_declarator): New. cp: * lex.c: Don't include c-lex.h. * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h. doc: * passes.texi, tm.texi: Update. objc: * Make-lang.in: Update and correct. * objc-act.c: Don't include c-lex.h or cpplib.h. treelang: * treetree.c: Don't include c-lex.h. config: * darwin-c.c: Don't include c-lex.h. * c4x/c4x-c.c: Don't include c-lex.h. * c4x/t-c4x: Update. * i370/i370-c.c: Don't include c-lex.h. * i370/t-i370: Update. * i960/i960-c.c: Don't include c-lex.h. * i960/i960.c: Don't include cpplib.h, c-lex.h or c-pragma.h. * i960/t-960bare: Update. * i960/t-vxworks: Update. * rs6000/rs6000-c.c: Don't include c-lex.h; include c-pragma.h. * rs6000/t-darwin: Update. * rs6000/t-rs6000-c-rule: Update. * v850/v850-c.c: Don't include c-lex.h. * v850/v850.c: Don't include c-lex.h or cpplib.h. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53876 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r--gcc/c-decl.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index 3dcb05540ec..223f905c3f6 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -37,7 +37,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "output.h"
#include "expr.h"
#include "c-tree.h"
-#include "c-lex.h"
#include "toplev.h"
#include "ggc.h"
#include "tm_p.h"
@@ -7289,3 +7288,24 @@ build_void_list_node ()
tree t = build_tree_list (NULL_TREE, void_type_node);
return t;
}
+
+/* Return something to represent absolute declarators containing a *.
+ TARGET is the absolute declarator that the * contains.
+ TYPE_QUALS_ATTRS is a list of modifiers such as const or volatile
+ to apply to the pointer type, represented as identifiers, possible mixed
+ with attributes.
+
+ We return an INDIRECT_REF whose "contents" are TARGET (inside a TREE_LIST,
+ if attributes are present) and whose type is the modifier list. */
+
+tree
+make_pointer_declarator (type_quals_attrs, target)
+ tree type_quals_attrs, target;
+{
+ tree quals, attrs;
+ tree itarget = target;
+ split_specs_attrs (type_quals_attrs, &quals, &attrs);
+ if (attrs != NULL_TREE)
+ itarget = tree_cons (attrs, target, NULL_TREE);
+ return build1 (INDIRECT_REF, quals, itarget);
+}