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
Concatenation operator ".=" does not work for &statusline with GCC 12 Release build #19125
Comments
Works for me. (Sorry, not sure what else I can say here.) |
Seems only reproducible with Arch Linux community package, not with appimage. |
It's very strange that this bug is only present in |
including a fix for the latest Arch Linux version when used with <https://github.com/equalsraf/neovim-qt>, where `let &rtp.=,…` appears to have stopped working (neovim/neovim#19125).
Using At the beginning of
Meanwhile,
|
What's stranger is that if I pass the value of diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index 7b6e954b3..732837f4f 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -9547,6 +9547,7 @@ static const char *find_option_end(const char **const arg, int *const opt_flags)
return NULL;
}
*arg = p;
+ (void)_(p);
if (p[0] == 't' && p[1] == '_' && p[2] != NUL && p[3] != NUL) {
p += 4; // t_xx/termcap option |
My setup broke because I used Building with Looks like there's been some work to replace |
git-svn-id: file:///srv/repos/svn-community/svn@1239811 9fca08f4-af9d-4005-b8df-a31f2cc04f65
git-svn-id: file:///srv/repos/svn-community/svn@1239811 9fca08f4-af9d-4005-b8df-a31f2cc04f65
|
I've ran into the same issue earlier today.
Yes, char_u and char are allowed to alias, but we're casting |
Both are addresses of pointers to arbitrary bytes of memory, they are pretty much as related as two pointer types ever could be. But it seems even byte-level addressing is something that GCC wants to fuck up because some footnote to a footnote in the standard could be interpreted as allowing to fuck it up. |
I believe type compatibility is preserved by pointers, i.e. if That said, if you don't want to worry about the standard's aliasing rules you should add the |
Type compatibility isn't relevant here, strict aliasing is. The code tries to access a
Can the flag be added to the build system by default? Because otherwise, the compiler is pretty much allowed to do that, and getting a ton of |
That's C++, not C. The languages have very different rules. See https://gist.github.com/shafik/848ae25ee209f698763cffee272a58f8 for a pretty good overview. |
Ahh, it's a C source file, my bad.
Then this applies, but char and unsigned char are not compatible types (C11 standard, section 6.2.7 - it's copyrighted, so I can only link to cppreference: https://en.cppreference.com/w/c/language/type#Compatible_types). |
Look for document N2176; it's the final draft of the C17 standard and publicly available. And yeah, you're right. The types aren't compatible. |
So it looks like this is a plan:
Added wiki page: https://github.com/neovim/neovim/wiki/Removing-char_u |
idk about N2176, but here's an older version: http://port70.net/~nsz/c/c99/n1256.html#6.5p7
That seems to allow char_u <=> char, no? Though this part is interesting:
|
Yes, but only directly: You can access a
|
Ah, undefined here literally means "they don't address it at all in the standard"? That's hilarious. So the way to figure out how C works is to comb through every sentence in the standard and then decide if the exact thing you want to do was or wasn't explicitly mentioned. |
Yes, anything which is not specified in exact detail in the standard in enough lawyer-proof language can be reinterpreted in any new compiler version to screw over working code that more or less universally was accepted by all existing compilers. |
char_u <=> char is allowed, but only because char_u can alias anything, not because of the quoted line. The signed type corresponding to |
This comment was marked as off-topic.
This comment was marked as off-topic.
@foonathan thanks for that note, added to https://github.com/neovim/neovim/wiki/Removing-char_u |
Is this still an issue on latest nightly? |
IIRC it has been fixed by a PR removing char_u. |
Neovim version (nvim -v)
NVIM v0.7.2
Vim (not Nvim) behaves the same?
no, vim 8.2.5046
Operating system/version
ArchLinux
Terminal name/version
Konsole 22.04.2 / TMux 3.3_a
$TERM environment variable
screen-256color
Installation
ArchLinux community repository
How to reproduce the issue
nvim --clean
:let &stl = "hello"
:let &stl .= " world"
Expected behavior
Status line should read:
hello world
Actual behavior
Status line reads:
world
The text was updated successfully, but these errors were encountered: