home *** CD-ROM | disk | FTP | other *** search
/ Amiga GigaPD 3 / Amiga_GigaPD_v3_3of3.iso / netbsd / docs / mailinglist-archive / 1993-12 / text0458.txt < prev    next >
Encoding:
Text File  |  1993-06-25  |  2.2 KB  |  52 lines

  1. >>>>> "MTK" == mw  <mw@eunet.ch> writes:
  2.  
  3. MTK> I now built 2.5.7 with the patch Niklas suggested, but I wasn't
  4. MTK> able to reproduce a change in behavior. Furthermore, I got the
  5. MTK> impression from trying to understand what the patch does, that it
  6. MTK> only plays some role in error-recovery (at least it references an
  7. MTK> error node...).
  8.  
  9. Hmm, did I suggest a specific patch?  Or did you look at the config/svr4.h
  10. macro:
  11.  
  12. /* Output the size directive for a decl in rest_of_decl_compilation
  13.    in the case where we did not do so before the initializer.
  14.    Once we find the error_mark_node, we know that the value of
  15.    size_directive_output was set
  16.    by ASM_DECLARE_OBJECT_NAME when it was run for the same decl.  */
  17.  
  18. #define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END)     \
  19. do {                                     \
  20.      char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0);             \
  21.      if (!flag_inhibit_size_directive && DECL_SIZE (DECL)         \
  22.          && ! AT_END && TOP_LEVEL                     \
  23.      && DECL_INITIAL (DECL) == error_mark_node             \
  24.      && !size_directive_output)                     \
  25.        {                                 \
  26.      fprintf (FILE, "\t%s\t ", SIZE_ASM_OP);             \
  27.      assemble_name (FILE, name);                     \
  28.      fprintf (FILE, ",%d\n",  int_size_in_bytes (TREE_TYPE (DECL))); \
  29.        }                                 \
  30.    } while (0)
  31.  
  32. I must say, the comment confuses me, but I *know* the reason for this
  33. macro.  The error_mark_node is probably just a flag value in this case.
  34. Pre 2.5 gcc parsed full initializers before emitting any code.
  35. In those versions the size of initializers were known before the emitting.
  36. When RMS put his pet in, this size couldn't be calculated until after
  37. the emitting phase (at least for char x[] = {...} type of decls).
  38. Most architectures don't care about the size directive (well, maybe
  39. debuggers do) but some shared-lib implementations do, notably SVR4.
  40. Hey MTK, aren't you on GCC2 list anymore?  I think you used to be,
  41. wasn't it so?  Well, I haven't looked a bit at the NetBSD gcc port,
  42. certainly not as, ld and ld.so, so I don't know if anything here
  43. applies.
  44.  
  45. Niklas
  46.  
  47. Niklas Hallqvist    Phone: +46-(0)31-40 75 00
  48. Applitron Datasystem    Fax:   +46-(0)31-83 39 50
  49. Molndalsvagen 95    Email: niklas@appli.se
  50. S-412 63  GOTEBORG, Sweden     mcsun!seunet!appli!niklas
  51.  
  52.