diff --git a/.dir-locals.el b/.dir-locals.el
index fa031cbded9909889dbe4442182a8ae9721b6c29..2c12b3866633b08f190a223bedf5b15f4c0af6e6 100644
--- a/.dir-locals.el
+++ b/.dir-locals.el
@@ -18,6 +18,10 @@
 	      (tcl-continued-indent-level . 4)
 	      (indent-tabs-mode . t)))
  (nil . ((bug-reference-url-format . "https://gcc.gnu.org/PR%s")))
+ ;; Please keep C and C++ in sync.
  (c-mode . ((c-file-style . "GNU")
 	    (indent-tabs-mode . t)
-	    (fill-column . 79))))
+	    (fill-column . 79)))
+ (c++-mode . ((c-file-style . "GNU")
+	      (indent-tabs-mode . t)
+	      (fill-column . 79))))