[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/12760] LTO doesn't work with .gnu.warning section

From: amodra at gmail dot com
Subject: [Bug ld/12760] LTO doesn't work with .gnu.warning section
Date: Mon, 16 May 2011 13:52:50 +0000


--- Comment #7 from Alan Modra <amodra at gmail dot com> 2011-05-16 13:52:20 
UTC ---
modified bar.c testing other warning sym cases

#define linker_warning(x, msg) \
    asm(".section .gnu.warning." #x "\n\t.previous"); \
    static const char __warn_##x[] \
    __attribute__((used, section(".gnu.warning." #x "\n\t#"))) \
    = msg

volatile int x;
void bar (void) { x++; }
linker_warning(bar, "should warn about bar");

void notcalled (void) { x--; }
linker_warning(notcalled, "linker bug, should not warn about notcalled");

linker_warning(notdef, "linker bug, should not warn about notdef");

Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]