OSDN Git Service

* rtl.h (NOTE_DATA): Refer to whole union.
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 3 Jul 2003 09:52:26 +0000 (09:52 +0000)
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 3 Jul 2003 09:52:26 +0000 (09:52 +0000)
* emit-rtl.c (emit_note): Use memset to clear NOTE_DATA.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68874 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/emit-rtl.c
gcc/rtl.h

index b96942d..520c9d9 100644 (file)
@@ -1,3 +1,8 @@
+2003-07-02  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * rtl.h (NOTE_DATA): Refer to whole union.
+       * emit-rtl.c (emit_note): Use memset to clear NOTE_DATA.
+
 2003-07-03  Eric Botcazou  <ebotcazou@libertysurf.fr>
 
        PR optimization/11381
index c3f36fa..2cc83ea 100644 (file)
@@ -4733,7 +4733,7 @@ emit_note (int note_no)
   note = rtx_alloc (NOTE);
   INSN_UID (note) = cur_insn_uid++;
   NOTE_LINE_NUMBER (note) = note_no;
-  NOTE_DATA (note) = 0;
+  memset (&NOTE_DATA (note), 0, sizeof (NOTE_DATA (note)));
   BLOCK_FOR_INSN (note) = NULL;
   add_insn (note);
   return note;
index de76ec2..e3e41d2 100644 (file)
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -778,7 +778,7 @@ extern const char * const reg_note_name[];
    */
 
 /* Opaque data.  */
-#define NOTE_DATA(INSN)                XCINT (INSN, 4, NOTE)
+#define NOTE_DATA(INSN)                RTL_CHECKC1 (INSN, 4, NOTE)
 #define NOTE_SOURCE_FILE(INSN) XCSTR (INSN, 4, NOTE)
 #define NOTE_BLOCK(INSN)       XCTREE (INSN, 4, NOTE)
 #define NOTE_EH_HANDLER(INSN)  XCINT (INSN, 4, NOTE)