Issue Details (XML | Word | Printable)

Key: PCC-422
Type: Bug Bug
Status: Closed Closed
Resolution: Won't Fix
Priority: Minor Minor
Assignee: Anders Magnusson
Reporter: Iain Hibbert
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
pcc

#pragma section does have no effect on code

Created: 10/Apr/14 11:26 PM   Updated: 19/Apr/14 04:15 PM
Component/s: C frontend
Affects Version/s: None
Fix Version/s: None

Environment: NetBSD 6.99.40/i386


 Description  « Hide
the #pragma section command has no effect on code. For example

#pragma section .text.foo
void foo(void)
{
}

when compiled, just places the code into the normal .text section and not .text.foo

btw the manpage for ccom(1) does mention that this is broken

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Anders Magnusson added a comment - 19/Apr/14 05:56 AM
I'm not convinced that we should continue to support the section pragma at all. It seems that very few uses it in the "real" world. Comments?

Iain Hibbert added a comment - 19/Apr/14 09:45 AM
I think you could be right.

although pragma is the C99 method suggested for compiler specific controls, it seems to me that attributes can be a better way to set options for objects, and the section attribute is already supported.

Anders Magnusson added a comment - 19/Apr/14 04:15 PM
Ok, removed now.