home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Education Sampler 1992 [NeXTSTEP]
/
Education_1992_Sampler.iso
/
NeXT
/
GnuSource
/
cc-61.0.1
/
cc
/
objcplus-diffs
< prev
next >
Wrap
Text File
|
1991-06-04
|
10KB
|
353 lines
*** Makefile.in Mon Jun 3 10:32:43 1991
--- Makefile.in.objc++ Mon Jun 3 14:06:57 1991
***************
*** 204,210 ****
c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o dbxout.o
# Language-specific object files for C++.
! CPLUS_OBJS = cplus-tab.o cplus-decl.o cplus-decl2.o \
cplus-typeck.o cplus-type2.o cplus-tree.o cplus-ptree.o \
cplus-cvt.o cplus-search.o cplus-lex.o cplus-gc.o cplus-call.o \
cplus-class.o cplus-init.o cplus-method.o cplus-except.o \
--- 204,210 ----
c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o dbxout.o
# Language-specific object files for C++.
! CPLUS_OBJS = cplus-lang.o cplus-tab.o cplus-decl.o cplus-decl2.o \
cplus-typeck.o cplus-type2.o cplus-tree.o cplus-ptree.o \
cplus-cvt.o cplus-search.o cplus-lex.o cplus-gc.o cplus-call.o \
cplus-class.o cplus-init.o cplus-method.o cplus-except.o \
*** /Net/ohio/redbird/mself/fsf/cplus-lex.c Mon Jun 3 10:46:54 1991
--- ./cplus-lex.c Mon Jun 3 13:26:29 1991
***************
*** 788,800 ****
/* toplev.c needs to call these. */
void
! lang_init ()
{
- /* the beginning of the file is a new line; check for # */
- /* With luck, we discover the real source file's name from that
- and put it in input_filename. */
- put_back (check_newline ());
-
if (flag_cadillac)
cadillac_start ();
if (flag_gnu_xref) GNU_xref_begin (input_filename);
--- 788,795 ----
/* toplev.c needs to call these. */
void
! cplus_init ()
{
if (flag_cadillac)
cadillac_start ();
if (flag_gnu_xref) GNU_xref_begin (input_filename);
***************
*** 801,807 ****
}
void
! lang_finish ()
{
extern int errorcount, sorrycount;
if (flag_gnu_xref) GNU_xref_end (errorcount+sorrycount);
--- 796,802 ----
}
void
! cplus_finish ()
{
extern int errorcount, sorrycount;
if (flag_gnu_xref) GNU_xref_end (errorcount+sorrycount);
*** /Net/ohio/redbird/mself/fsf/cplus-tree.c Mon Jun 3 10:48:52 1991
--- ./cplus-tree.c Mon Jun 3 13:33:09 1991
***************
*** 1482,1488 ****
}
void
! print_lang_statistics ()
{
extern struct obstack maybepermanent_obstack;
print_obstack_statistics ("class_obstack", &class_obstack);
--- 1482,1488 ----
}
void
! print_cplus_statistics ()
{
extern struct obstack maybepermanent_obstack;
print_obstack_statistics ("class_obstack", &class_obstack);
*** /Net/ohio/redbird/mself/fsf/cplus-decl2.c Mon Jun 3 10:44:50 1991
--- ./cplus-decl2.c Tue Jun 4 12:20:40 1991
***************
*** 279,285 ****
return 0 if not recognized. */
int
! lang_decode_option (p)
char *p;
{
if (!strcmp (p, "-ftraditional") || !strcmp (p, "-traditional"))
--- 279,285 ----
return 0 if not recognized. */
int
! cplus_decode_option (p)
char *p;
{
if (!strcmp (p, "-ftraditional") || !strcmp (p, "-traditional"))
***************
*** 2116,2121 ****
--- 2116,2124 ----
finish_function (lineno, 0);
+ assemble_destructor (IDENTIFIER_POINTER (fnname));
+
+ #if 0
if (flag_gnu_binutils)
{
/* Now tell GNU LD that this is part of the static destructor set. */
***************
*** 2124,2129 ****
--- 2127,2133 ----
assemble_name (asm_out_file, IDENTIFIER_POINTER (fnname));
fputc ('\n', asm_out_file);
}
+ #endif
/* if it needed cleaning, then it will need messing up: drop through */
***************
*** 2260,2265 ****
--- 2264,2273 ----
pop_momentary ();
finish_function (lineno, 0);
+
+ assemble_constructor (IDENTIFIER_POINTER (fnname));
+
+ #if 0
if (flag_gnu_binutils)
{
/* Now tell GNU LD that this is part of the static constructor set. */
***************
*** 2268,2273 ****
--- 2276,2282 ----
assemble_name (asm_out_file, IDENTIFIER_POINTER (fnname));
fputc ('\n', asm_out_file);
}
+ #endif
}
#ifdef SOS
*** /Net/ohio/redbird/mself/fsf/cplus-tree.h Mon Jun 3 10:49:02 1991
--- ./cplus-tree.h Tue Jun 4 10:05:54 1991
***************
*** 296,301 ****
--- 296,304 ----
extern int flag_cadillac;
+ extern int maybe_objc_comptypes ();
+ extern tree maybe_building_objc_message_expr ();
+
/* C++ language-specific tree codes. */
#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) SYM,
enum cplus_tree_code {
***************
*** 305,311 ****
};
#undef DEFTREECODE
! enum languages { lang_c, lang_cplusplus };
/* Macros to make error reporting functions' lives easier. */
#if 0
--- 308,314 ----
};
#undef DEFTREECODE
! enum languages { lang_c, lang_cplusplus, lang_objc };
/* Macros to make error reporting functions' lives easier. */
#if 0
***************
*** 1247,1252 ****
--- 1250,1256 ----
extern tree prev_class_type;
extern tree current_lang_name, lang_name_cplusplus, lang_name_c;
+ extern tree lang_name_objc;
extern tree do_identifier (), hack_identifier ();
extern tree hack_operator (), hack_wrapper ();
*** /Net/ohio/redbird/mself/fsf/cplus-typeck.c Mon Jun 3 10:49:51 1991
--- ./cplus-typeck.c Mon Jun 3 13:42:11 1991
***************
*** 537,543 ****
{
case RECORD_TYPE:
case UNION_TYPE:
! if (t1 == t2)
return 1;
if (strict <= 0)
goto look_hard;
--- 537,543 ----
{
case RECORD_TYPE:
case UNION_TYPE:
! if (t1 == t2 || maybe_objc_comptypes (t1, t2))
return 1;
if (strict <= 0)
goto look_hard;
***************
*** 4947,4952 ****
--- 4947,4955 ----
register tree ttl = TREE_TYPE (type);
register tree ttr = TREE_TYPE (rhstype);
+ if (maybe_objc_comptypes (ttl, ttr))
+ return convert (type, rhs);
+
/* If both pointers are of aggregate type, then we
can give better error messages, and save some work
as well. */
***************
*** 5182,5188 ****
int argnum;
{
if (function)
! warning (arg_msg, argnum, IDENTIFIER_POINTER (function));
else
warning (anon_msg, opname);
}
--- 5185,5198 ----
int argnum;
{
if (function)
! {
! tree selector = maybe_building_objc_message_expr ();
!
! if (selector && argnum > 2)
! warning (arg_msg, argnum - 2, IDENTIFIER_POINTER (selector));
! else
! warning (arg_msg, argnum, IDENTIFIER_POINTER (function));
! }
else
warning (anon_msg, opname);
}
*** /Net/ohio/redbird/mself/fsf/cplus-decl.c Mon Jun 3 10:44:20 1991
--- ./cplus-decl.c Tue Jun 4 10:06:47 1991
***************
*** 2999,3004 ****
--- 2999,3005 ----
/* Have to make these distinct before we try using them. */
lang_name_cplusplus = get_identifier ("C++");
lang_name_c = get_identifier ("C");
+ lang_name_objc = get_identifier ("Objective-C");
/* Initially, C. */
current_lang_name = lang_name_c;
***************
*** 3737,3742 ****
--- 3738,3756 ----
return grokdeclarator (TREE_VALUE (typename),
TREE_PURPOSE (typename),
TYPENAME, 0, NULL_TREE);
+ }
+
+ /* Return a PARM_DECL node for a given pair of specs and declarator. */
+
+ tree
+ groktypename_in_parm_context (typename)
+ tree typename;
+ {
+ if (TREE_CODE (typename) != TREE_LIST)
+ return typename;
+ return grokdeclarator (TREE_VALUE (typename),
+ TREE_PURPOSE (typename),
+ PARM, 0, NULL_TREE);
}
/* Decode a declarator in an ordinary declaration or data definition.
*** /Net/ohio/redbird/mself/fsf/cplus-class.c Mon Jun 3 10:42:10 1991
--- ./cplus-class.c Mon Jun 3 17:10:08 1991
***************
*** 91,97 ****
static int current_lang_stacksize;
/* Names of languages we recognize. */
! tree lang_name_c, lang_name_cplusplus;
tree current_lang_name;
tree minus_one_node;
--- 91,97 ----
static int current_lang_stacksize;
/* Names of languages we recognize. */
! tree lang_name_c, lang_name_cplusplus, lang_name_objc;
tree current_lang_name;
tree minus_one_node;
***************
*** 3471,3482 ****
--- 3471,3490 ----
{
strict_prototype = strict_prototypes_lang_cplusplus;
current_lang_name = name;
+ install_reserved_words (lang_cplusplus);
}
else if (name == lang_name_c)
{
strict_prototype = strict_prototypes_lang_c;
current_lang_name = name;
+ install_reserved_words(lang_c);
}
+ else if (name == lang_name_objc)
+ {
+ /* for now, treat Objective-C like C, other code depends on this */
+ current_lang_name = lang_name_c;
+ install_reserved_words (lang_objc);
+ }
else
error ("language string `\"%s\"' not recognized", IDENTIFIER_POINTER (name));
***************
*** 3492,3501 ****
cadillac_pop_lang ();
current_lang_name = *--current_lang_stack;
if (current_lang_name == lang_name_cplusplus)
! strict_prototype = strict_prototypes_lang_cplusplus;
else if (current_lang_name == lang_name_c)
! strict_prototype = strict_prototypes_lang_c;
}
int
--- 3500,3521 ----
cadillac_pop_lang ();
current_lang_name = *--current_lang_stack;
+
if (current_lang_name == lang_name_cplusplus)
! {
! strict_prototype = strict_prototypes_lang_cplusplus;
! install_reserved_words (lang_cplusplus);
! }
else if (current_lang_name == lang_name_c)
! {
! strict_prototype = strict_prototypes_lang_c;
! install_reserved_words (lang_c);
! }
! else if (current_lang_name == lang_name_objc)
! {
! strict_prototype = strict_prototypes_lang_c;
! install_reserved_words (lang_objc);
! }
}
int