On Fri, 31 Mar 2023, Valery Ushakov wrote:
On Fri, Mar 31, 2023 at 15:25:02 +, RVP wrote:
You have to create an empty file for `-E -dM' to work correctly:
Not necessary, -x c++ is enough, but that's a very common pitfall
indeed.
Great! thanks... now I won't have to create superfluous
On Fri, Mar 31, 2023 at 03:30:56PM -, Michael van Elst wrote:
> There is magic involved.
You mean: there are bugs - bah :-/
Martin
On Fri, Mar 31, 2023 at 15:25:02 +, RVP wrote:
> You have to create an empty file for `-E -dM' to work correctly:
Not necessary, -x c++ is enough, but that's a very common pitfall
indeed.
# c, despite being called as c++
$ g++ -dM -E - < /dev/null | egrep -i 'stdc|plus'
#define
mar...@duskware.de (Martin Husemann) writes:
> > c++ -dM -E - < /dev/null | fgrep __STDC_VERSION__
>#define __STDC_VERSION__ 201710L
> > c++ -dM -E - < /dev/null | fgrep __ISO
There is magic involved.
% touch c.c
% ls -l c.c
-rw-r--r-- 1 mlelstv staff 0 Mar 31 17:28 c.c
% c++ -dM -E - < c.c
On Fri, 31 Mar 2023, Martin Husemann wrote:
On Fri, Mar 31, 2023 at 02:27:17PM -, Michael van Elst wrote:
c++ also doesn't define __STDC_VERSION__ nor _ISOC99_SOURCE.
It defines the former but not the latter:
> c++ -dM -E - < /dev/null | fgrep __STDC_VERSION__
#define __STDC_VERSION__
On Fri, Mar 31, 2023 at 02:27:17PM -, Michael van Elst wrote:
> c++ also doesn't define __STDC_VERSION__ nor _ISOC99_SOURCE.
It defines the former but not the latter:
> c++ -dM -E - < /dev/null | fgrep __STDC_VERSION__
#define __STDC_VERSION__ 201710L
> c++ -dM -E - < /dev/null | fgrep
w...@netbsd.org (Thomas Klausner) writes:
>> Make sure c++ with using at least -std=c++11?
>Same error, also with c++17 and gnu++17. Probably lua does something
>weird.
lua defines _XOPEN_SOURCE in lprefix.h:
#if !defined(_XOPEN_SOURCE)
#define _XOPEN_SOURCE 600
#elif _XOPEN_SOURCE
On Fri, Mar 31, 2023 at 02:46:18PM +0200, Joerg Sonnenberger wrote:
> Am Fri, Mar 31, 2023 at 02:39:40PM +0200 schrieb Thomas Klausner:
> > On Fri, Mar 31, 2023 at 02:35:38PM +0200, Martin Husemann wrote:
> > > Which options does it pass to g++ ?
> >
> > Good point, but it's not the compiler,
Am Fri, Mar 31, 2023 at 02:39:40PM +0200 schrieb Thomas Klausner:
> On Fri, Mar 31, 2023 at 02:35:38PM +0200, Martin Husemann wrote:
> > Which options does it pass to g++ ?
>
> Good point, but it's not the compiler, it's lua itself:
>
> tar xvzf lua-5.4.4.tar.gz
> cd lua-5.4.4/src
>
On Fri, Mar 31, 2023 at 02:35:38PM +0200, Martin Husemann wrote:
> Which options does it pass to g++ ?
Good point, but it's not the compiler, it's lua itself:
tar xvzf lua-5.4.4.tar.gz
cd lua-5.4.4/src
c++ lbaselib.c
and see it fail.
In file included from lua.h:16,
On Fri, Mar 31, 2023 at 02:10:46PM +0200, Thomas Klausner wrote:
> g++ in -current doesn't get this symbol when you include limits.h
> (which lua does, since this is still C code) because of (from
> /usr/include/machine/limits.h):
>
> #if defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >=
Hi!
mame wants to compile lua with a c++ compiler.[1]
lua has a check in its headers to detect C99 mode by looking for
LLONG_MAX. If that is not found (and no workaround like an explicit
fallback to 32-bit ints is defined) then it fails to compile.
g++ in -current doesn't get this symbol when
12 matches
Mail list logo