-
-
Notifications
You must be signed in to change notification settings - Fork 608
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deduplicate pragma(startAddress) semantic
#14512
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also why do we even support a pragma statement for start address?
it seems just as useless as a pragma statement for inlining.
| void start() | ||
| { | ||
| pragma(startaddress, start); | ||
| } | ||
| pragma(startaddress, start); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
surely having multiple start addresses should give an error? Or is this fine because its the same function for both?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently it doesn't check for it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
surely having multiple start addresses should give an error? Or is this fine because its the same function for both?
Who cares, the pragma isn't implemented anyway. ;-)
I asked this on Slack in #dlang. Apparently it's an OMF-only thing. I think we can deprecate it, but I'll ask Walter in the meeting next Friday. |
|
Actually, it does seem to have users (despite most of them being from tests in gcc/gdc forks) https://github.com/search?l=D&q=pragma%28startaddress&type=Code We can also keep it supported for legacy, it's not much code |
Sorry for the confusion, I was talking about the one which you just added, that one is a statement (I think) the existing one is a declaration. |
Ignoring the hundreds of forks of gcc, unique matches I see are:
So I count only one actual user. :-) |
The duplication lead to Issue 11980 being fixed in one place (pragma declarations) but not the other (pragma statements).