GNU logs - #31198, boring messages


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#31198: 25.1; Semantic fails to find system include (header) files
Resent-From: johol@HIDDEN
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 17 Apr 2018 15:00:01 +0000
Resent-Message-ID: <handler.31198.B.15239771967411 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 31198
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: 31198 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.15239771967411
          (code B ref -1); Tue, 17 Apr 2018 15:00:01 +0000
Received: (at submit) by debbugs.gnu.org; 17 Apr 2018 14:59:56 +0000
Received: from localhost ([127.0.0.1]:57665 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1f8S5L-0001vS-DK
	for submit <at> debbugs.gnu.org; Tue, 17 Apr 2018 10:59:55 -0400
Received: from eggs.gnu.org ([208.118.235.92]:60820)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <johol@HIDDEN>) id 1f8NQ5-0007Zp-Vo
 for submit <at> debbugs.gnu.org; Tue, 17 Apr 2018 06:01:02 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <johol@HIDDEN>) id 1f8NPu-0006WD-Hj
 for submit <at> debbugs.gnu.org; Tue, 17 Apr 2018 06:00:56 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:38507)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <johol@HIDDEN>)
 id 1f8NPu-0006T7-CA
 for submit <at> debbugs.gnu.org; Tue, 17 Apr 2018 06:00:50 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:51706)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <johol@HIDDEN>) id 1f8NPn-00085S-Ho
 for bug-gnu-emacs@HIDDEN; Tue, 17 Apr 2018 06:00:49 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <johol@HIDDEN>) id 1f8NPk-0004nP-CH
 for bug-gnu-emacs@HIDDEN; Tue, 17 Apr 2018 06:00:43 -0400
Received: from mail.lysator.liu.se ([2001:6b0:17:f0a0::3]:58609)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <johol@HIDDEN>)
 id 1f8NPj-0003DH-Vp
 for bug-gnu-emacs@HIDDEN; Tue, 17 Apr 2018 06:00:40 -0400
Received: from mail.lysator.liu.se (localhost [127.0.0.1])
 by mail.lysator.liu.se (Postfix) with ESMTP id 1E11C40021
 for <bug-gnu-emacs@HIDDEN>; Tue, 17 Apr 2018 12:00:31 +0200 (CEST)
Received: by mail.lysator.liu.se (Postfix, from userid 33)
 id 07F8540003; Tue, 17 Apr 2018 12:00:30 +0200 (CEST)
Received: from proxy10.securemote.net (proxy10.securemote.net
 [136.163.203.6]) by webmail.lysator.liu.se (Horde Framework) with HTTPS;
 Tue, 17 Apr 2018 10:00:30 +0000
Date: Tue, 17 Apr 2018 10:00:30 +0000
Message-ID: <20180417100030.Horde.OolrEdLzMW9x9fJ3WI_fesU@HIDDEN>
From: johol@HIDDEN
User-Agent: Horde Application Framework 5
Content-Type: text/plain; charset=utf-8; format=flowed; DelSp=Yes
MIME-Version: 1.0
Content-Disposition: inline
X-Virus-Scanned: ClamAV using ClamSMTP
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.3 (----)
X-Mailman-Approved-At: Tue, 17 Apr 2018 10:59:54 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.3 (-----)

GNU Emacs 25.1.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.18.9)
System Description: CentOS release 6.4 (Final)


Summary
=======

Semantic fails to locate C/C++ system header files when a system  
header file in turn uses double quotes instead of angle brackets in  
include statements.


Example
=======

Assume the trivial C++ source file Foo.cpp that just contains a single  
include statement

---- 8< -----
#include <QFile>
---- 8< -----

The system include path for the ede-cpp-project points to the  
directory /usr/include and Semantic is able to properly locate the  
QFile header in /usr/include/QtCore/.

However, the header file /usr/include/QtCore/QFile contains only a  
single include statement that points to the file qfile.h. This include  
statement uses double quotes instead of angle brackets, i.e. the  
contents of the file QFile is

---- 8< -----
#include "qfile.h"
---- 8< -----

What happens is that Semantic gets confused since the include  
statement is using the syntax for local include files instead of  
system include files. Thus Semantic is unable to locate qfile.h header  
since it is located in the system include directory  
/usr/include/QtCore and the project local include path does not  
include this directory (and it should not need to do that).


Proposed solution
=================
When a system include/header file (a header file found via system  
include path) uses double quotes Semantic should treat the include  
statement as if it really was using angle brackets instead of double  
quotes and thus be able to properly locate qfile.h via QFile. As it is  
now Semantic will always mark the row with the #include <QFile> as a  
not parsed header. That is, within "system header files" (header files  
that are located via the system include path) include statements using  
angle bracket and double quote are synonyms with each other.

This change in Semantic behavior could be controlled via a setting  
that is default off in order to be backward compatible.

Note: If the Foo.cpp example source file instead looked like this

---- 8< -----
#include <qfile.h>
---- 8< -----

Semantic is able to locate the qfile.h header file and parse it.





Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: johol@HIDDEN
Subject: bug#31198: Acknowledgement (25.1; Semantic fails to find system
 include (header) files)
Message-ID: <handler.31198.B.15239771967411.ack <at> debbugs.gnu.org>
References: <20180417100030.Horde.OolrEdLzMW9x9fJ3WI_fesU@HIDDEN>
X-Gnu-PR-Message: ack 31198
X-Gnu-PR-Package: emacs
Reply-To: 31198 <at> debbugs.gnu.org
Date: Tue, 17 Apr 2018 15:00:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-gnu-emacs@HIDDEN

If you wish to submit further information on this problem, please
send it to 31198 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
31198: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D31198
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems



Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.