public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Cyril Hrubis <chrubis@suse.cz>
Cc: ltp@lists.linux.it, Jan Kara <jack@suse.com>
Subject: Re: [LTP] [PATCH] config: Explicitly set gnu99
Date: Tue, 22 Nov 2022 09:26:11 +0100	[thread overview]
Message-ID: <Y3yHo7tw4kT8J4H7@pevik> (raw)
In-Reply-To: <Y3ukncX84lQTJNe9@rei>

Hi all,

Reviewed-by: Petr Vorel <pvorel@suse.cz>

> Hi!
> > > I woder if this would work with different compilers. I suppose clang
> > > does work, but what about icc?

> > Clang is fine. I doubt that icc compiles LTP at present unless it does
> > support GNU extensions.

> Fair enough.

FYI The code was compiled also with -std=c99 on both gcc and clang
(just in case some strange compiler had problems with gnu99).

> > > I supose that we get tons of 'can't do pointer arithmetics on void*
> > > pointers and stuff' with plain c99. Maybe it would be better to clean
> > > these out instead.

> > https://github.com/richiejp/ltp/actions/runs/3515165803/jobs/5890081736

> > Some of this is solved by -D_XOPEN_SOURCE=700 or some other macro (we
> > need multiple). However it doesn't end there:

> >  make STDCFLAGS='-std=c2x -D_XOPEN_SOURCE=700'
> > make -C "lib" \
> > 	-f "/home/rich/qa/ltp/lib/Makefile" all
> > make[1]: Entering directory '/home/rich/qa/ltp/lib'
> > In file included from ../include/old/test.h:37,
> >                  from get_path.c:41:
> > get_path.c: In function ‘tst_get_path’:
> > ../include/tst_minmax.h:10:9: warning: implicit declaration of function ‘typeof’ [-Wimplicit-function-declaration]
> >    10 |         typeof(a) _a = (a); \
> >       |         ^~~~~~


> Hmm that's strange, supposedly typeof() is finally standartized in c2x,
> but it would be obviously missing from anything older.

> > We probably also use 'x ?: y' and stuff like that.

> > So this opens up a rats nest basically.

> Sigh, well LTP was never a nice codebase, at least it compiles most of
> the time these days.

Kind regards,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

      parent reply	other threads:[~2022-11-22  8:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-21 14:45 [LTP] [PATCH] config: Explicitly set gnu99 Richard Palethorpe via ltp
2022-11-21 15:09 ` Cyril Hrubis
2022-11-21 15:14   ` Richard Palethorpe
2022-11-21 16:17     ` Cyril Hrubis
2022-11-22  8:11       ` Richard Palethorpe
2022-11-22  9:30         ` Petr Vorel
2022-11-22 10:00           ` Richard Palethorpe
2022-11-22  8:26       ` Petr Vorel [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y3yHo7tw4kT8J4H7@pevik \
    --to=pvorel@suse.cz \
    --cc=chrubis@suse.cz \
    --cc=jack@suse.com \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox