emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Chris Andrews <codexarcanum@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Bug: Incorrect type in ob-C.el for D code [8.3.4 (8.3.4-elpa @ ~/.emacs.d/elpa/org-20160222/)]
Date: Thu, 25 Feb 2016 21:23:18 +0100	[thread overview]
Message-ID: <871t801qvd.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <CAJ6NN7f52L9U1DuX7EXhu1S4L29NN1gW+D4z-CNOD2BWdq446A@mail.gmail.com> (Chris Andrews's message of "Tue, 23 Feb 2016 16:45:03 -0600")

Hello,

Chris Andrews <codexarcanum@gmail.com> writes:

> Issue is fairly straightforward.  When evaluating a D code block that
> includes a table var, this error is thrown by the DMD compiler.
>
> ~\Temp\babel-1032v-N\C-src-1032Xig.d(25): Error: cannot implicitly convert
> expression (row) of type ulong to uint
> Failed: ["dmd", "-v", "-o-", "~/Temp/babel-1032v-N/C-src-1032Xig.d",
> "-I~/Local/Temp/babel-1032v-N"]
>
> The type `ulong` is not appropriate for the generated code, as it
> represents an array index.  The fix is to change line 434 in ob-C.el from:
>
>  "string %s_h (ulong row, string col) { return
> %s[row][get_column_num(%s_header,col)]; }"
>
> to read:
>
>  "string %s_h (size_t row, string col) { return
> %s[row][get_column_num(%s_header,col)]; }"
>
>
> The use of `size_t` is correct for array indexes, and fixes the error in
> the compiler.

Thank you for the report. 

Do you want to provide a patch for that? See
<http://orgmode.org/worg/org-contribute.html> for details, if you're
interested.

Regards,

-- 
Nicolas Goaziou

  reply	other threads:[~2016-02-25 20:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-23 22:45 Bug: Incorrect type in ob-C.el for D code [8.3.4 (8.3.4-elpa @ ~/.emacs.d/elpa/org-20160222/)] Chris Andrews
2016-02-25 20:23 ` Nicolas Goaziou [this message]
2016-03-20 14:31   ` Thierry Banel
2016-03-25 23:30     ` Nicolas Goaziou

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

  List information: https://www.orgmode.org/

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

  git send-email \
    --in-reply-to=871t801qvd.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=codexarcanum@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.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).