Skip to content
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

Compiler Warning: address of local variable #645

Open
micwoj92 opened this issue May 31, 2024 · 1 comment
Open

Compiler Warning: address of local variable #645

micwoj92 opened this issue May 31, 2024 · 1 comment

Comments

@micwoj92
Copy link

Similar to #603

Using gcc 14.1

rc/kx.c: In function ‘ex’:
src/kx.c:637:8: warning: function may return address of local variable [-Wreturn-local-addr]
  637 |   R z; }
      |        ^
src/kx.c:614:8: note: declared here
  614 | K ex(K a)   //Input is (usually, but not always) 7-0 type from wd()
      |      ~~^
@bakul
Copy link
Contributor

bakul commented May 31, 2024

Function ex_ seems to be the culprit here. It has a return type of V, not K and it returns a value of type V in one place and of type K in another.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants