| Summary: | Reports implicit declarations despite code compiles without warnings | ||
|---|---|---|---|
| Product: | [Applications] kdevelop | Reporter: | Norbert <norbertzpilicy> |
| Component: | Problem reporter | Assignee: | kdevelop-bugs-null |
| Status: | REPORTED --- | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | 5.7.211203 | ||
| Target Milestone: | --- | ||
| Platform: | Arch Linux | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: |
Errors visible
Compiles without errors/warnings |
||
Created attachment 147929 [details]
Errors visible
Created attachment 147930 [details]
Compiles without errors/warnings
Adding `#define __USE_POSIX 1` before `#include <signal.h>` sometimes fixes the issue. |
SUMMARY The code is marked as invalid or warnings are listed. STEPS TO REPRODUCE 1. Insert sample code. 2. Watch the errors 3. Compile code without warnings or errors OBSERVED RESULT Lots of errors and warining despite correct includes EXPECTED RESULT No warnings or errors SOFTWARE/OS VERSIONS Linux/KDE Plasma: Arch Linux KDE Plasma Version: 5.24.3 KDE Frameworks Version: 5.92.0 Qt Version: 5.15.3 ADDITIONAL INFORMATION Sample code used: ```c #include <stdio.h> #include <signal.h> #include <stdlib.h> #define SIGNAL SIGUSR1 void action_handler(int sig, siginfo_t *info, void *ucontext) { printf("received signal %d\n", sig); exit(0); } int main(int argc, char** argv) { struct sigaction sa; sigaction(SIGNAL, NULL, &sa); sa.sa_sigaction = action_handler; sigaction(SIGNAL, &sa, NULL); raise(SIGNAL); while(1); return 0; } ```