Re: Doubts about GCC advancement (GSoC)

2022-01-24 Thread Martin Jambor
Hello, I am delighted you found contributing to GCC interesting. Sorry for the delay in replying. I am adding the GCC mailing list in case other GCC developers have something to add to my reply. It is usually a good idea to email the list and not an individual, if only because most of the commu

Re: GSoC: Working on the static analyzer

2022-01-24 Thread Ankur Saini via Gcc
The following can be a possible example of a case where the analyzer fails to understand POSIX file-descriptor API. - - - #include #include void test() { int fd; fd = open("foo.txt", O_RDONLY | O_CREAT); } void test_2() { FILE *f; f = fopen("demo.c", "r"); } godbolt link: http

syslog: ISO C does not support the ‘%m’ gnu_printf format

2022-01-24 Thread Kris Andersen via Gcc
The %m format specifier is a documented feature of syslog, but gcc gives a warning when -Wpedantic is used. Is this a bug? For example, the program: #include int main(void) { syslog(LOG_ERR, "%m"); return 0; } gives: warning: ISO C does not support the ‘%m’ gnu_printf format [-Wformat=]

Re: syslog: ISO C does not support the ‘%m’ gnu_printf format

2022-01-24 Thread Ankur Saini via Gcc
> On 25-Jan-2022, at 9:38 AM, Kris Andersen via Gcc wrote: > > The %m format specifier is a documented feature of syslog, but gcc gives a > warning when -Wpedantic is used. Is this a bug? > > For example, the program: > > #include > int main(void) > { >syslog(LOG_ERR, "%m"); >return