{"action":"created","issue":{"url":"https://api.github.com/repos/MatzeB/cparser/issues/10","labels_url":"https://api.github.com/repos/MatzeB/cparser/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/MatzeB/cparser/issues/10/comments","events_url":"https://api.github.com/repos/MatzeB/cparser/issues/10/events","html_url":"https://github.com/MatzeB/cparser/issues/10","id":121737972,"number":10,"title":"No C99 compliant functions are used","user":{"login":"hiyuh","id":96903,"avatar_url":"https://avatars.githubusercontent.com/u/96903?v=3","gravatar_id":"","url":"https://api.github.com/users/hiyuh","html_url":"https://github.com/hiyuh","followers_url":"https://api.github.com/users/hiyuh/followers","following_url":"https://api.github.com/users/hiyuh/following{/other_user}","gists_url":"https://api.github.com/users/hiyuh/gists{/gist_id}","starred_url":"https://api.github.com/users/hiyuh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hiyuh/subscriptions","organizations_url":"https://api.github.com/users/hiyuh/orgs","repos_url":"https://api.github.com/users/hiyuh/repos","events_url":"https://api.github.com/users/hiyuh/events{/privacy}","received_events_url":"https://api.github.com/users/hiyuh/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-12-11T16:06:58Z","updated_at":"2015-12-13T17:07:50Z","closed_at":"2015-12-12T09:56:08Z","body":"SSIA.\r\n```\r\n$ make\r\n...\r\nsrc/driver/c_driver.c: In function ‘run_external_preprocessor’:\r\nsrc/driver/c_driver.c:368:2: warning: implicit declaration of function ‘popen’ [-Wimplicit-function-declaration]\r\n  FILE *f = popen(commandline, \"r\");\r\n  ^\r\nsrc/driver/c_driver.c:368:12: warning: initialization makes pointer from integer without a cast\r\n  FILE *f = popen(commandline, \"r\");\r\n            ^\r\nCC build/debug/./src/parser/token.o\r\nsrc/driver/driver.c: In function ‘close_input’:\r\nsrc/driver/driver.c:136:3: warning: implicit declaration of function ‘pclose’ [-Wimplicit-function-declaration]\r\n   res = pclose(unit->input) == EXIT_SUCCESS;\r\n   ^\r\n...\r\nsrc/parser/preprocessor.c: In function ‘update_timestamp’:\r\nsrc/parser/preprocessor.c:2798:3: warning: implicit declaration of function ‘fileno’ [-Wimplicit-function-declaration]\r\n   int   const fd = fileno(file);\r\n   ^\r\nLD build/debug/cparser\r\n```\r\n\r\naccording to glibc man pages,\r\n* using `popen()` and `pclose()` requires `stdio.h` and `_POSIX_C_SOURCE >= 2 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE`.\r\n* using `fileno()` requires `stdio.h` and `_POSIX_C_SOURCE >= 1 || _XOPEN_SOURCE || _POSIX_SOURCE`.\r\n  note, `src/parser/preprocessor.c` does not include `stdio.h` explicitly.\r\n\r\nalso top Makefile has hardcoded `-std=c99 -pedantic`.\r\n```\r\n$ grep -e '-std=c99 -pedantic' -n Makefile\r\n21:CFLAGS += -Wall -W -Wstrict-prototypes -Wmissing-prototypes -std=c99 -pedantic\r\n```\r\n\r\nP.S.\r\ni don't know about cparser coding convention correctly.\r\nbut using pedantic standard explicitly by default and breaking them looks simply uncool."},"comment":{"url":"https://api.github.com/repos/MatzeB/cparser/issues/comments/164277714","html_url":"https://github.com/MatzeB/cparser/issues/10#issuecomment-164277714","issue_url":"https://api.github.com/repos/MatzeB/cparser/issues/10","id":164277714,"user":{"login":"earnie","id":484076,"avatar_url":"https://avatars.githubusercontent.com/u/484076?v=3","gravatar_id":"","url":"https://api.github.com/users/earnie","html_url":"https://github.com/earnie","followers_url":"https://api.github.com/users/earnie/followers","following_url":"https://api.github.com/users/earnie/following{/other_user}","gists_url":"https://api.github.com/users/earnie/gists{/gist_id}","starred_url":"https://api.github.com/users/earnie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/earnie/subscriptions","organizations_url":"https://api.github.com/users/earnie/orgs","repos_url":"https://api.github.com/users/earnie/repos","events_url":"https://api.github.com/users/earnie/events{/privacy}","received_events_url":"https://api.github.com/users/earnie/received_events","type":"User","site_admin":false},"created_at":"2015-12-13T17:07:50Z","updated_at":"2015-12-13T17:07:50Z","body":"\r\nPOSIX != \\__STRICT_ANSI__\r\n\r\nThe two are entirely different.  If \\__STRICT_ANSI__ is defined then you need to follow the ANSI standard document and not the POSIX one.  The macro \\__STRICT_ANSI__ means do not define any functions outside of the standard document for ANSI.\r\n"}}