bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#24611: 24.5; c++-mode does not highlight nullptr keyword in C++11


From: Marvin Gülker
Subject: bug#24611: 24.5; c++-mode does not highlight nullptr keyword in C++11
Date: Tue, 4 Oct 2016 13:05:51 +0200
User-agent: Mutt/1.7.0 (2016-08-17)

Hi,

Emacs' c++-mode does not highlight the `nullptr' keyword. To reproduce:

1. Open a C++11 file that makes use of the `nullptr' keyword.
2. Perceive `nullptr' is not higlighted.

Example code looks like this simple program:

    #include <iostream>

    int main()
    {
      int* ptr = nullptr; // << nullptr keyword used
      std::cout << "test program" << std::endl;
      return 0;
    }

Compile this with `g++ -std=c++11 filename.cpp -o program' to see it is
valid code.

The expected result is that the keyword `nullptr', which was introduced
with C++11, is higlighted as a keyword or otherwise stand out from
regular identifiers. It should probably be highlighted the same way as
the `NULL' constant traditionally used before C++11 as it was inherited
from C. Both `NULL' and `nullptr' serve the same purpose, so
highlighting it the same way as `NULL' is probably preferrable to
highlighting it like a real keyword (e.g., `class'). In any case, it
should be highlighted in some way.

Greetings
Marvin

In GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9)
 of 2016-09-23 on hades
Windowing system distributor `The X.Org Foundation', version 11.0.11804000
Configured using:
 `configure --prefix=/usr --build=x86_64-pc-linux-gnu
 --host=x86_64-pc-linux-gnu --mandir=/usr/share/man
 --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc
 --localstatedir=/var/lib --disable-dependency-tracking
 --disable-silent-rules --docdir=/usr/share/doc/emacs-24.5-r3
 --htmldir=/usr/share/doc/emacs-24.5-r3/html --libdir=/usr/lib64
 --program-suffix=-emacs-24 --infodir=/usr/share/info/emacs-24
 --localstatedir=/var
 --enable-locallisppath=/etc/emacs:/usr/share/emacs/site-lisp
 --with-gameuser=:gamestat --without-compress-install
 --with-file-notification=inotify --enable-acl --without-dbus
 --without-gpm --without-hesiod --without-kerberos --without-kerberos5
 --without-xml2 --without-selinux --with-gnutls --without-wide-int
 --with-zlib --with-sound=alsa --with-x --without-ns --without-gconf
 --without-gsettings --without-toolkit-scroll-bars --with-gif
 --with-jpeg --with-png --with-rsvg --with-tiff --with-xpm
 --without-imagemagick --with-xft --without-libotf --without-m17n-flt
 --with-x-toolkit=gtk3 GENTOO_PACKAGE=app-editors/emacs-24.5-r3
 'CFLAGS=-march=native -O2 -pipe' CPPFLAGS= 'LDFLAGS=-Wl,-O1
 -Wl,--as-needed''

Important settings:
  value of $LANG: de_DE.utf8
  locale-coding-system: utf-8-unix

Major mode: C++/l

Minor modes in effect:
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t
  abbrev-mode: t

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
help-fns mail-prsvr mail-utils cc-langs cl-loaddefs cl-lib cc-mode
cc-fonts easymenu cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine
cc-vars cc-defs time-date tooltip electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt
fringe tabulated-list newcomment lisp-mode prog-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core frame cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process inotify
dynamic-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty emacs)

Memory information:
((conses 16 102886 3623)
 (symbols 48 19877 0)
 (miscs 40 40 135)
 (strings 32 16456 4066)
 (string-bytes 1 566361)
 (vectors 16 11298)
 (vector-slots 8 410533 3503)
 (floats 8 61 85)
 (intervals 56 268 16)
 (buffers 960 12)
 (heap 1024 21679 806))





reply via email to

[Prev in Thread] Current Thread [Next in Thread]