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
bss-name(push, "...") doesn't work without bss-name(pop) #900
Comments
|
From my perspective there are two issues (which might or might not be connected):
|
This is not a minor issue at all. I declare variables in a certain segment, but forget to pop the segment. |
|
|
O.k., last reply to this:
That's what a compiler is for, isn't it? To catch syntax issues. If you mistype a variable and the C compiler assumes that this is a new variable, PHP-style, would you also say: "There's a simple workaround: Don't make typos"? Or if you forget a closing bracket: Is it acceptable and a "minor issue" if the compiler still compiles the code and then simply throws out everything that happened after the opening bracket, only generating an error if you happen to call a function that was declared after the problematic opening bracket?
The fact that all the other ...-name(push, ...) pragmas work even without popping them, implies that the intention is that you don't have to pop it in the end.
"May", not "must". Hence, a push without a pop being completely ignored is exactly 100% the same severance as the other pragma without the push. |
|
Further posts like this will make me shut down the cc65 issue tracker altogether - be warned ! |
|
The weekend is coming, calm down... |
|
It's a puzzling consequence of Pull Request #454. #pragma bss-name("MY_BSS") // has no effect yet
unsigned char Variable1;
unsigned char Variable2;
unsigned char Variable3;
#pragma bss-name("MY_BSS2") // now the first one works as desired |
|
I had forgotten that Fixed in commit 644d623. |
This code:
produces this output:
The segment is only changed when
#pragma bss-name(pop)is used, as well.However, other
#pragma ...-name(push, "...")swork fine without a pop:(Also, the current behavior makes
#pragma bss-name("MY_BSS")(without the push) useless since this one cannot be popped, but omitting a pop results in the pragma being ignored.)The text was updated successfully, but these errors were encountered: