all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Gerd Möllmann" <gerd.moellmann@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: GCC/clang warning for Complex integers?
Date: Mon, 01 Jul 2024 14:55:59 +0300	[thread overview]
Message-ID: <86bk3hfhrk.fsf@gnu.org> (raw)
In-Reply-To: <m234otwlm9.fsf@pro2.fritz.box> (message from Gerd Möllmann on Mon, 01 Jul 2024 10:40:46 +0200)

> From: Gerd Möllmann <gerd.moellmann@gmail.com>
> Date: Mon, 01 Jul 2024 10:40:46 +0200
> 
> Does someone know how to get a warning for using imaginary numbers like
> so (typo)?
> 
>   unsigned char *data = alloc (nbytes + 1i, IGC_OBJ_STRING_DATA);
> 
> That compiles without a warning for me, and one is in for a surprise. I
> can't find the compiler flag that makes that a warning or error (tried with
> clang 18 and GCC 14).

Try compiling with -std=c99.  (Caveat: you might get gobs of warnings
that way.)



  reply	other threads:[~2024-07-01 11:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-01  8:40 GCC/clang warning for Complex integers? Gerd Möllmann
2024-07-01 11:55 ` Eli Zaretskii [this message]
2024-07-01 12:54   ` Pip Cet
2024-07-01 13:51     ` Po Lu
2024-07-01 14:31       ` Gerd Möllmann

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=86bk3hfhrk.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=gerd.moellmann@gmail.com \
    /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.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.