From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5863 invoked by alias); 18 Feb 2012 09:54:38 -0000 Received: (qmail 5854 invoked by uid 22791); 18 Feb 2012 09:54:38 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 18 Feb 2012 09:54:25 +0000 From: "viniciustinti at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/52304] Gcc does not notice missing header instead it shows a warning. The compiled code may work or not. Date: Sat, 18 Feb 2012 09:56:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: viniciustinti at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-02/txt/msg01841.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52304 --- Comment #2 from Vinicius Tinti 2012-02-18 09:54:19 UTC --- Hello Jonathan, Sorry my mistake, I forget to remove the build folder content. There are only things generated by CMake. Please just do rm -rf build/* and try to run CMake again inside the build folder. Thus: rm -rf build/* cd build cmake .. make The only important files are: test.c test_included.c test_included.h test_not_included.c test_not_included.h. CMake does not allow you to change the path of the project after running it. So it is necessary to clean the build folder. Another very strange point is that if you run the code inside valgrind it works like a charm. In gdb it crashes also. Regards, Vinicius ==6562== Memcheck, a memory error detector ==6562== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al. ==6562== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info ==6562== Command: ./main ==6562== b0 [OK] ==6562== Warning: set address range perms: large range [0x393ce040, 0x793ce040) (undefined) ==6562== Warning: set address range perms: large range [0x393ce030, 0x793ce050) (noaccess) b1 [OK] b2 [OK] ==6562== Warning: set address range perms: large range [0x393ce040, 0x793ce040) (undefined) ==6562== Warning: set address range perms: large range [0x393ce030, 0x793ce050) (noaccess) b3 [OK] ==6562== ==6562== HEAP SUMMARY: ==6562== in use at exit: 0 bytes in 0 blocks ==6562== total heap usage: 4 allocs, 4 frees, 2,147,485,696 bytes allocated ==6562== ==6562== All heap blocks were freed -- no leaks are possible ==6562== ==6562== For counts of detected and suppressed errors, rerun with: -v ==6562== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 4 from 4)