unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#34849: Compilation issues with g++ on some files
@ 2019-03-13 21:12 Alex
  2019-03-17  5:22 ` Alex
  0 siblings, 1 reply; 18+ messages in thread
From: Alex @ 2019-03-13 21:12 UTC (permalink / raw)
  To: 34849; +Cc: Paul Eggert

I'm currently working on a prototype for a feature that requires the
introduction of C++ files, and I am having some issues compiling certain
files with g++. Any chance the below (particularly #3) could be easily
fixed?

1. Invalid conversions to pvec_type. Compiling with the -fpermissive
flag demotes these to warnings, but it would be nice to avoid using
that.

--8<---------------cut here---------------start------------->8---
./src/lisp.h: In function ‘pvec_type PSEUDOVECTOR_TYPE(const Lisp_Vector*)’:
./src/lisp.h:1683:11: error: invalid conversion from ‘long int’ to ‘pvec_type’ [-fpermissive]
   return (size & PSEUDOVECTOR_FLAG
          ~~~~~~~~~~~~~~~~~~~~~~~~~
           ? (size & PVEC_TYPE_MASK) >> PSEUDOVECTOR_AREA_BITS
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           : PVEC_NORMAL_VECTOR);
           ~~~~~~~~~~~~~~~~~~~~~
./src/lisp.h: In function ‘bool PSEUDOVECTORP(Lisp_Object, int)’:
./src/lisp.h:1708:6: error: invalid conversion from ‘int’ to ‘pvec_type’ [-fpermissive]
      code);
      ^~~~
--8<---------------cut here---------------end--------------->8---

2. This one just needs a new (not new) variable name.

--8<---------------cut here---------------start------------->8---
./src/lisp.h:1585:58: error: expected ‘,’ or ‘...’ before ‘new’
 SSET (Lisp_Object string, ptrdiff_t index, unsigned char new)
                                                          ^~~
./src/lisp.h: In function ‘void SSET(Lisp_Object, ptrdiff_t, unsigned char)’:
./src/lisp.h:1587:30: error: expected type-specifier before ‘;’ token
   SDATA (string)[index] = new;
                              ^
--8<---------------cut here---------------end--------------->8---

3. I'm not sure what to do for the next one, which is unfortunately
included by other files.

--8<---------------cut here---------------start------------->8---
./lib/time.h:769:1: error: expected ‘,’ or ‘...’ before ‘__timer’
 _GL_FUNCDECL_SYS (localtime_rz, struct tm *,
 ^~~~~~~~~~~~~~~~
./lib/time.h:771:50: error: nonnull argument with out-of-range operand number (argument 2, operand 3)
                    struct tm *restrict __result) _GL_ARG_NONNULL ((2, 3)));
                                                  ^~~~~~~~~~~~~~~
./lib/time.h:775:1: error: expected ‘,’ or ‘...’ before ‘__result’
 _GL_FUNCDECL_SYS (mktime_z, time_t,
 ^~~~~~~~~~~~~~~~
--8<---------------cut here---------------end--------------->8---





^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2019-03-21  2:10 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-13 21:12 bug#34849: Compilation issues with g++ on some files Alex
2019-03-17  5:22 ` Alex
2019-03-18  1:47   ` Richard Stallman
2019-03-18 16:18     ` Alex
2019-03-19  2:24       ` Richard Stallman
2019-03-19  2:37         ` Paul Eggert
2019-03-19  4:45         ` Alex
2019-03-19  7:33         ` Eli Zaretskii
2019-03-20  2:12           ` Paul Eggert
2019-03-20  6:04             ` Alex
2019-03-20  7:05               ` Eli Zaretskii
2019-03-20  6:38             ` Eli Zaretskii
2019-03-20  2:31           ` Richard Stallman
2019-03-20  6:53             ` Eli Zaretskii
2019-03-21  2:09               ` Richard Stallman
2019-03-20  2:32           ` Richard Stallman
2019-03-20 10:53             ` Dmitry Gutov
2019-03-21  2:10               ` Richard Stallman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).