Bug 27080 - gcc should emit .type directives for used undeclared extern variables and functions
gcc should emit .type directives for used undeclared extern variables and fun...
Status: UNCONFIRMED
Product: gcc
Classification: Unclassified
Component: middle-end
unknown
: P3 enhancement
: ---
Assigned To: Not yet assigned to anyone
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-04-08 03:54 UTC by Nicholas Miell
Modified: 2006-04-08 04:06 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicholas Miell 2006-04-08 03:54:49 UTC
It doesn't right now, but in a perfect world ld could complain if one object referred to a symbol of type object while another referred to the same symbol of type function.

Of course, in order for ld to do this, gcc would have to actually emit .type directives for extern variables and functions. It doesn't right now, hence this bug.
Comment 1 Andrew Pinski 2006-04-08 04:05:02 UTC
If we do it for all extern functions and variables, it would be about 1000 .types which are not useful.
Comment 2 Andrew Pinski 2006-04-08 04:06:58 UTC
I should note people do tricks and one of them would cause an error being emitting, maybe it should maybe not.  But even emitting used ones can go up in the .s file size causing more compile time issues.