|
Bugzilla – Full Text Bug Listing |
| Summary: | Bug in factory code checks for sequence-point | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE.org | Reporter: | Stephan Kleine <bitdealer> |
| Component: | BuildService | Assignee: | Richard Biener <rguenther> |
| Status: | RESOLVED INVALID | QA Contact: | Adrian Schröter <adrian.schroeter> |
| Severity: | Normal | ||
| Priority: | P4 - Low | CC: | andrea, dmueller, mrueckert |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Other | ||
| Whiteboard: | |||
| Found By: | --- | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Bug Depends on: | 444188 | ||
| Bug Blocks: | |||
| Attachments: |
The preprocessed source
The preprocessed source - 2nd try unreduced testcase |
||
|
Description
Stephan Kleine
2008-10-05 21:38:22 UTC
For Rudi, but he is on vacation this week. similar issue... error is: I: Program is using implicit definitions of special functions. these functions need to use their correct prototypes to allow the lightweight buffer overflow checking to work. - Implicit memory/string functions need #include <string.h>. - Implicit *printf functions need #include <stdio.h>. - Implicit *printf functions need #include <stdio.h>. - Implicit *read* functions need #include <unistd.h>. - Implicit *recv* functions need #include <sys/socket.h>. E: OpenCASCADE implicit-fortify-decl ../../../drv/ExprIntrp/lex.ExprIntrp.c: 2618 and file ../../../drv/ExprIntrp/lex.ExprIntrp.c is that one http://pastebin.com/f695fc969 the error tell me to add the following somewhere.. #include <string.h> #include <stdio.h> #include <unistd.h> #include <sys/socket.h> but as you can see stdio.h is already included (line 29), same for unistd.h (line 43) full log here https://build.opensuse.org/package/show?package=OpenCascade&project=home%3Aanubisg1 just look for the offending filename earlier in the build log and you will get a clue what is missing. the error message just says it is implict declarations. and mentions some common failures. looks to be a false positive: http://www.opencascade.org/org/forum/thread_14377/ (last comment by Denis Barbier) no way to suppress it? gcc warning checks ... calling for help ;) the quoted forum link contains the patch to fix the warning. another solution would be to use "-w" when building that particular file. unfortunately I couldn't figure out what the actual warning was because the buildservice project fails due to FHS file checks at the moment and not due to something else. to avoid that, remove the post-build-checks package (BuildIgnore: could do it I think, or BuildRequires: -post-build-checks). regarding comment one: the line in question is: id = (id == wxNOT_FOUND) ? 7 : ++id; however, the diagnostic location is indeed wrong. looks like a bug We need a testcase (preprocessed source of the offending file) to do anything about it. Sorry if I misunderstand you but I already posted the source in question (pastebin link in the first post) which contains nothing that would justify such an error so it is probably the wrong file (which is why I asked you to change the tests so they print out the line of code that made the check fail so I at least could grep for it). Besides that the whole stuff (source & build logs) are available from https://build.opensuse.org/package/show?package=CodeBlocks&project=home%3Abitshuffler (sorry for the inconvenience but I don't know a thing about C/C++). If comment #7 indicates the line that GCC warns about, then GCC is correct: id = (id == wxNOT_FOUND) ? 7 : ++id; There's a sequence point after the evaluation of the conditional, but not any more. Hence, if the condition is false, this is equivalent to: id = ++id; which indeed is invalid C and C++. I don't know if the rpmlint messages are now fixed to indicate the right line number or not, but this is no GCC bug. Reassigning to Dirk for the line number problem, he might close this if that is fixed. the line number that the gcc gives as warning is incorrect. its not a bug in rpmlint/build check. We need preprocessed source to do anything about this. Created attachment 249684 [details]
The preprocessed source
The attached files should provide the requested information.
If they don't, please tell me _exactly_ how to retrieve what you want.
The preprocessed file has been built with a precompiled header. Can you make sure to delete ../../../src/include/sdk_precomp.h.gch and undefine CB_PRECOMP before preprocessing? Basically the preprocessed source (the .ii file) should not contain lines like #pragma GCC pch_preprocess "../../../src/include/sdk_precomp.h.gch" Thanks. Richard. Created attachment 249753 [details]
The preprocessed source - 2nd try
I deleted ../../../src/include/sdk_precomp.h.gch and added "#undef CB_PRECOMP" at the top of projectsimporter.cpp and now there aren't any such lines in the .ii file.
If this is still not what you are looking for then please describe it in an even more brain dead / fool proof way because I don't really know what I am doing there ;D
Created attachment 249886 [details]
unreduced testcase
Massaged testcase to build with any G++ version and for 32bit and 64bit.
With the preprocessed testcase the line-number information is correct. So the bug is likely precompiled header related. The precompiled header has to be included from the primary source file or via -include. |