[Rcpp-devel] bug hunting

Douglas Bates bates at stat.wisc.edu
Tue Mar 23 19:36:11 CET 2010


On Tue, Mar 23, 2010 at 1:29 PM, Romain Francois
<romain.francois at dbmail.com> wrote:
> Le 23/03/10 16:04, Douglas Bates a écrit :
>>
>> On Tue, Mar 23, 2010 at 8:31 AM, Dirk Eddelbuettel<edd at debian.org>  wrote:
>>>
>>> On 23 March 2010 at 13:16, Romain Francois wrote:
>>> | Le 23/03/10 12:49, Dirk Eddelbuettel a écrit :
>>> |>
>>> |>  FYI, following Doug's lead re '-pedantic', I made that permanent for
>>> me via
>>> |>
>>> |>       edd at ron:~$ grep pedantic .R/*
>>> |>       .R/Makevars:CFLAGS=-g -O3 -Wall -pipe -pedantic
>>> |>       .R/Makevars:CXXFLAGS=-g -O3 -Wall -pipe -pedantic
>>> |>
>>> |>  which now reveals a lot of
>>> |>
>>> |>       ./RcppCommon.h:205:28: warning: anonymous variadic macros were
>>> introduced in C99
>>> |
>>> | We can kill this one with the -Wno-variadic-macros flag
>>>
>>> Hmpf. Not great.
>>>
>>> |>  as well as
>>> |>
>>> |>       from Promise.cpp:22:
>>> |>       ./Rcpp/Vector.h:434:30: warning: ISO C99 requires rest arguments
>>> to be used
>>> |>       ./Rcpp/Vector.h:441:29: warning: ISO C99 requires rest arguments
>>> to be used
>>> |>       ./Rcpp/Vector.h:477:26: warning: ISO C99 requires rest arguments
>>> to be used
>>> |>       ./Rcpp/Vector.h:482:30: warning: ISO C99 requires rest arguments
>>> to be used
>>> |>       ./Rcpp/Vector.h:496:31: warning: ISO C99 requires rest arguments
>>> to be used
>>> |
>>> | This one, I'm not sure. Any ideas ?
>>>
>>> #ifdef protect your DEBUG macro that triggers is?
>>
>> Those are the cases where RCPP_DEBUG is being called with a format
>> string only.  The message seems to indicate that there should be at
>> least one other argument in the ... list, even if it is not used.  I
>> got rid of the warnings by appending ", 0" to the format string when
>> it appears alone.  I would check in the modified file except that
>> emacs has changed the indentation on all the lines that I changed and
>> I can't easily recover the original indentation.
>
> Thanks for this. I commited it earlier.

I saw that.  Thanks.

> For future reference, I don't mind if you reindent the code to suit emacs,
> I'm used to Dirk doing it.

I have C++ mode in emacs configured so that certain keystrokes indent
lines and, for me, the indentation step is four.  I believe that
multiple indents are expressed as tabs but I'm not sure.

In other words, my mode hook is
(add-hook 'c++-mode-hook
	  (lambda () (c-set-style "bsd")
	    (setq c-basic-offset 4)))

If Dirk has a preferred style or offset I am happy to modify to
whatever he sends.  He knows the intricacies of emacs better than I
do.

> Does that mean I should use "soft tabs" (emulated with spaces) ?
>
> --
> Romain Francois
> Professional R Enthusiast
> +33(0) 6 28 91 30 30
> http://romainfrancois.blog.free.fr
> |- http://tr.im/OIXN : raster images and RImageJ
> |- http://tr.im/OcQe : Rcpp 0.7.7
> `- http://tr.im/O1wO : highlight 0.1-5
>
>
>


More information about the Rcpp-devel mailing list