------- Comment #19 from mmitchel at gcc dot gnu dot org 2008-12-28 18:41 ------- I agree with Steven that there are some cases (like -ffunction-sections) where even popping back from the debug section after generating it doesn't work. However, I'm not sure that's a reason not to do it -- reducing the chances for unexpected behavior is still progress. This is a real "gotcha".
At the least, we should document the problem shown by this bug before closing it. There should be a warning to users that they must explicitly indicate the section in which they want to place their "asm", by using an appropriate ".section" directive (or equivalent, depending on their choice of assembler and operating system). We should also explain whether this is required for local asms, or only for those occurring at global scope. That would at least clarify our intent. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33932