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 >
Text File  |  1991-06-04  |  10KB  |  353 lines

  1. *** Makefile.in    Mon Jun  3 10:32:43 1991
  2. --- Makefile.in.objc++    Mon Jun  3 14:06:57 1991
  3. ***************
  4. *** 204,210 ****
  5.      c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o dbxout.o
  6.   
  7.   # Language-specific object files for C++.
  8. ! CPLUS_OBJS = cplus-tab.o cplus-decl.o cplus-decl2.o \
  9.      cplus-typeck.o cplus-type2.o cplus-tree.o cplus-ptree.o \
  10.      cplus-cvt.o cplus-search.o cplus-lex.o cplus-gc.o cplus-call.o \
  11.      cplus-class.o cplus-init.o cplus-method.o cplus-except.o \
  12. --- 204,210 ----
  13.      c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o dbxout.o
  14.   
  15.   # Language-specific object files for C++.
  16. ! CPLUS_OBJS = cplus-lang.o cplus-tab.o cplus-decl.o cplus-decl2.o \
  17.      cplus-typeck.o cplus-type2.o cplus-tree.o cplus-ptree.o \
  18.      cplus-cvt.o cplus-search.o cplus-lex.o cplus-gc.o cplus-call.o \
  19.      cplus-class.o cplus-init.o cplus-method.o cplus-except.o \
  20. *** /Net/ohio/redbird/mself/fsf/cplus-lex.c    Mon Jun  3 10:46:54 1991
  21. --- ./cplus-lex.c    Mon Jun  3 13:26:29 1991
  22. ***************
  23. *** 788,800 ****
  24.   /* toplev.c needs to call these.  */
  25.   
  26.   void
  27. ! lang_init ()
  28.   {
  29. -   /* the beginning of the file is a new line; check for # */
  30. -   /* With luck, we discover the real source file's name from that
  31. -      and put it in input_filename.  */
  32. -   put_back (check_newline ());
  33.     if (flag_cadillac)
  34.       cadillac_start ();
  35.     if (flag_gnu_xref) GNU_xref_begin (input_filename);
  36. --- 788,795 ----
  37.   /* toplev.c needs to call these.  */
  38.   
  39.   void
  40. ! cplus_init ()
  41.   {
  42.     if (flag_cadillac)
  43.       cadillac_start ();
  44.     if (flag_gnu_xref) GNU_xref_begin (input_filename);
  45. ***************
  46. *** 801,807 ****
  47.   }
  48.   
  49.   void
  50. ! lang_finish ()
  51.   {
  52.     extern int errorcount, sorrycount;
  53.     if (flag_gnu_xref) GNU_xref_end (errorcount+sorrycount);
  54. --- 796,802 ----
  55.   }
  56.   
  57.   void
  58. ! cplus_finish ()
  59.   {
  60.     extern int errorcount, sorrycount;
  61.     if (flag_gnu_xref) GNU_xref_end (errorcount+sorrycount);
  62. *** /Net/ohio/redbird/mself/fsf/cplus-tree.c    Mon Jun  3 10:48:52 1991
  63. --- ./cplus-tree.c    Mon Jun  3 13:33:09 1991
  64. ***************
  65. *** 1482,1488 ****
  66.   }
  67.   
  68.   void
  69. ! print_lang_statistics ()
  70.   {
  71.     extern struct obstack maybepermanent_obstack;
  72.     print_obstack_statistics ("class_obstack", &class_obstack);
  73. --- 1482,1488 ----
  74.   }
  75.   
  76.   void
  77. ! print_cplus_statistics ()
  78.   {
  79.     extern struct obstack maybepermanent_obstack;
  80.     print_obstack_statistics ("class_obstack", &class_obstack);
  81. *** /Net/ohio/redbird/mself/fsf/cplus-decl2.c    Mon Jun  3 10:44:50 1991
  82. --- ./cplus-decl2.c    Tue Jun  4 12:20:40 1991
  83. ***************
  84. *** 279,285 ****
  85.      return 0 if not recognized.  */
  86.   
  87.   int   
  88. ! lang_decode_option (p)
  89.        char *p;
  90.   {
  91.     if (!strcmp (p, "-ftraditional") || !strcmp (p, "-traditional"))
  92. --- 279,285 ----
  93.      return 0 if not recognized.  */
  94.   
  95.   int   
  96. ! cplus_decode_option (p)
  97.        char *p;
  98.   {
  99.     if (!strcmp (p, "-ftraditional") || !strcmp (p, "-traditional"))
  100. ***************
  101. *** 2116,2121 ****
  102. --- 2116,2124 ----
  103.   
  104.     finish_function (lineno, 0);
  105.   
  106. +   assemble_destructor (IDENTIFIER_POINTER (fnname));
  107. + #if 0
  108.     if (flag_gnu_binutils)
  109.       {
  110.         /* Now tell GNU LD that this is part of the static destructor set.  */
  111. ***************
  112. *** 2124,2129 ****
  113. --- 2127,2133 ----
  114.         assemble_name (asm_out_file, IDENTIFIER_POINTER (fnname));
  115.         fputc ('\n', asm_out_file);
  116.       }
  117. + #endif
  118.   
  119.     /* if it needed cleaning, then it will need messing up: drop through  */
  120.   
  121. ***************
  122. *** 2260,2265 ****
  123. --- 2264,2273 ----
  124.         pop_momentary ();
  125.   
  126.         finish_function (lineno, 0);
  127. +       assemble_constructor (IDENTIFIER_POINTER (fnname));
  128. + #if 0
  129.         if (flag_gnu_binutils)
  130.       {
  131.         /* Now tell GNU LD that this is part of the static constructor set.  */
  132. ***************
  133. *** 2268,2273 ****
  134. --- 2276,2282 ----
  135.         assemble_name (asm_out_file, IDENTIFIER_POINTER (fnname));
  136.         fputc ('\n', asm_out_file);
  137.       }
  138. + #endif
  139.       }
  140.   
  141.   #ifdef SOS
  142. *** /Net/ohio/redbird/mself/fsf/cplus-tree.h    Mon Jun  3 10:49:02 1991
  143. --- ./cplus-tree.h    Tue Jun  4 10:05:54 1991
  144. ***************
  145. *** 296,301 ****
  146. --- 296,304 ----
  147.   
  148.   extern int flag_cadillac;
  149.   
  150. + extern int maybe_objc_comptypes ();
  151. + extern tree maybe_building_objc_message_expr ();
  152.   /* C++ language-specific tree codes.  */
  153.   #define DEFTREECODE(SYM, NAME, TYPE, LENGTH) SYM,
  154.   enum cplus_tree_code {
  155. ***************
  156. *** 305,311 ****
  157.   };
  158.   #undef DEFTREECODE
  159.   
  160. ! enum languages { lang_c, lang_cplusplus };
  161.   
  162.   /* Macros to make error reporting functions' lives easier.  */
  163.   #if 0
  164. --- 308,314 ----
  165.   };
  166.   #undef DEFTREECODE
  167.   
  168. ! enum languages { lang_c, lang_cplusplus, lang_objc };
  169.   
  170.   /* Macros to make error reporting functions' lives easier.  */
  171.   #if 0
  172. ***************
  173. *** 1247,1252 ****
  174. --- 1250,1256 ----
  175.   extern tree prev_class_type;
  176.   
  177.   extern tree current_lang_name, lang_name_cplusplus, lang_name_c;
  178. + extern tree lang_name_objc;
  179.   
  180.   extern tree do_identifier (), hack_identifier ();
  181.   extern tree hack_operator (), hack_wrapper ();
  182. *** /Net/ohio/redbird/mself/fsf/cplus-typeck.c    Mon Jun  3 10:49:51 1991
  183. --- ./cplus-typeck.c    Mon Jun  3 13:42:11 1991
  184. ***************
  185. *** 537,543 ****
  186.       {
  187.       case RECORD_TYPE:
  188.       case UNION_TYPE:
  189. !       if (t1 == t2)
  190.       return 1;
  191.         if (strict <= 0)
  192.       goto look_hard;
  193. --- 537,543 ----
  194.       {
  195.       case RECORD_TYPE:
  196.       case UNION_TYPE:
  197. !       if (t1 == t2 || maybe_objc_comptypes (t1, t2))
  198.       return 1;
  199.         if (strict <= 0)
  200.       goto look_hard;
  201. ***************
  202. *** 4947,4952 ****
  203. --- 4947,4955 ----
  204.         register tree ttl = TREE_TYPE (type);
  205.         register tree ttr = TREE_TYPE (rhstype);
  206.   
  207. +       if (maybe_objc_comptypes (ttl, ttr))
  208. +     return convert (type, rhs);
  209.         /* If both pointers are of aggregate type, then we
  210.        can give better error messages, and save some work
  211.        as well.  */
  212. ***************
  213. *** 5182,5188 ****
  214.        int argnum;
  215.   {
  216.     if (function)
  217. !     warning (arg_msg, argnum, IDENTIFIER_POINTER (function));
  218.     else
  219.       warning (anon_msg, opname);
  220.   }
  221. --- 5185,5198 ----
  222.        int argnum;
  223.   {
  224.     if (function)
  225. !     {
  226. !       tree selector = maybe_building_objc_message_expr ();
  227. !       
  228. !       if (selector && argnum > 2)
  229. !     warning (arg_msg, argnum - 2, IDENTIFIER_POINTER (selector));
  230. !       else
  231. !     warning (arg_msg, argnum, IDENTIFIER_POINTER (function));
  232. !     }
  233.     else
  234.       warning (anon_msg, opname);
  235.   }
  236. *** /Net/ohio/redbird/mself/fsf/cplus-decl.c    Mon Jun  3 10:44:20 1991
  237. --- ./cplus-decl.c    Tue Jun  4 10:06:47 1991
  238. ***************
  239. *** 2999,3004 ****
  240. --- 2999,3005 ----
  241.     /* Have to make these distinct before we try using them.  */
  242.     lang_name_cplusplus = get_identifier ("C++");
  243.     lang_name_c = get_identifier ("C");
  244. +   lang_name_objc = get_identifier ("Objective-C");
  245.   
  246.     /* Initially, C.  */
  247.     current_lang_name = lang_name_c;
  248. ***************
  249. *** 3737,3742 ****
  250. --- 3738,3756 ----
  251.     return grokdeclarator (TREE_VALUE (typename),
  252.                TREE_PURPOSE (typename),
  253.                TYPENAME, 0, NULL_TREE);
  254. + }
  255. + /* Return a PARM_DECL node for a given pair of specs and declarator.  */
  256. + tree
  257. + groktypename_in_parm_context (typename)
  258. +      tree typename;
  259. + {
  260. +   if (TREE_CODE (typename) != TREE_LIST)
  261. +     return typename;
  262. +   return grokdeclarator (TREE_VALUE (typename),
  263. +              TREE_PURPOSE (typename),
  264. +              PARM, 0, NULL_TREE);
  265.   }
  266.   
  267.   /* Decode a declarator in an ordinary declaration or data definition.
  268. *** /Net/ohio/redbird/mself/fsf/cplus-class.c    Mon Jun  3 10:42:10 1991
  269. --- ./cplus-class.c    Mon Jun  3 17:10:08 1991
  270. ***************
  271. *** 91,97 ****
  272.   static int current_lang_stacksize;
  273.   
  274.   /* Names of languages we recognize.  */
  275. ! tree lang_name_c, lang_name_cplusplus;
  276.   tree current_lang_name;
  277.   
  278.   tree minus_one_node;
  279. --- 91,97 ----
  280.   static int current_lang_stacksize;
  281.   
  282.   /* Names of languages we recognize.  */
  283. ! tree lang_name_c, lang_name_cplusplus, lang_name_objc;
  284.   tree current_lang_name;
  285.   
  286.   tree minus_one_node;
  287. ***************
  288. *** 3471,3482 ****
  289. --- 3471,3490 ----
  290.       {
  291.         strict_prototype = strict_prototypes_lang_cplusplus;
  292.         current_lang_name = name;
  293. +       install_reserved_words (lang_cplusplus);
  294.       }
  295.     else if (name == lang_name_c)
  296.       {
  297.         strict_prototype = strict_prototypes_lang_c;
  298.         current_lang_name = name;
  299. +       install_reserved_words(lang_c);
  300.       }
  301. +   else if (name == lang_name_objc)
  302. +     {
  303. +       /* for now, treat Objective-C like C, other code depends on this */
  304. +       current_lang_name = lang_name_c;
  305. +       install_reserved_words (lang_objc);
  306. +     }
  307.     else
  308.       error ("language string `\"%s\"' not recognized", IDENTIFIER_POINTER (name));
  309.   
  310. ***************
  311. *** 3492,3501 ****
  312.       cadillac_pop_lang ();
  313.   
  314.     current_lang_name = *--current_lang_stack;
  315.     if (current_lang_name == lang_name_cplusplus)
  316. !     strict_prototype = strict_prototypes_lang_cplusplus;
  317.     else if (current_lang_name == lang_name_c)
  318. !     strict_prototype = strict_prototypes_lang_c;
  319.   }
  320.   
  321.   int
  322. --- 3500,3521 ----
  323.       cadillac_pop_lang ();
  324.   
  325.     current_lang_name = *--current_lang_stack;
  326.     if (current_lang_name == lang_name_cplusplus)
  327. !     {
  328. !       strict_prototype = strict_prototypes_lang_cplusplus;
  329. !       install_reserved_words (lang_cplusplus);
  330. !     }
  331.     else if (current_lang_name == lang_name_c)
  332. !     {
  333. !       strict_prototype = strict_prototypes_lang_c;
  334. !       install_reserved_words (lang_c);
  335. !     }
  336. !   else if (current_lang_name == lang_name_objc)
  337. !     {
  338. !       strict_prototype = strict_prototypes_lang_c;
  339. !       install_reserved_words (lang_objc);
  340. !     }
  341.   }
  342.   
  343.   int
  344.