This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[committed] #ifdef -> if HAVE_GAS_CFI_SECTIONS_DIRECTIVE (PR debug/40521)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 9 Oct 2009 21:09:01 +0200
- Subject: [committed] #ifdef -> if HAVE_GAS_CFI_SECTIONS_DIRECTIVE (PR debug/40521)
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
Hi!
HAVE_GAS_CFI_SECTIONS_DIRECTIVE is always defined, either to 0 or 1, so
#ifdef on it is wrong. I don't see how it can make a difference except
maybe for PCH, but still it is correct to use it this way.
Committed as obvious.
2009-10-09 Jakub Jelinek <jakub@redhat.com>
PR debug/40521
* dwarf2out.c (dwarf2out_init): Test whether
HAVE_GAS_CFI_SECTIONS_DIRECTIVE is non-zero instead of checking
it is defined.
--- gcc/dwarf2out.c.jj 2009-10-09 12:19:05.000000000 +0200
+++ gcc/dwarf2out.c 2009-10-09 21:03:22.000000000 +0200
@@ -20351,15 +20351,13 @@ dwarf2out_init (const char *filename ATT
ASM_OUTPUT_LABEL (asm_out_file, cold_text_section_label);
}
-#ifdef HAVE_GAS_CFI_SECTIONS_DIRECTIVE
- if (dwarf2out_do_cfi_asm ())
+ if (HAVE_GAS_CFI_SECTIONS_DIRECTIVE && dwarf2out_do_cfi_asm ())
{
#ifndef TARGET_UNWIND_INFO
if (USING_SJLJ_EXCEPTIONS || (!flag_unwind_tables && !flag_exceptions))
#endif
fprintf (asm_out_file, "\t.cfi_sections\t.debug_frame\n");
}
-#endif
}
/* A helper function for dwarf2out_finish called through
Jakub