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