Skip Menu |

This queue is for tickets about the AI-MaxEntropy CPAN distribution.

Report information
The Basics
Id: 33868
Status: open
Priority: 0/
Queue: AI-MaxEntropy

People
Owner: Nobody in particular
Requestors: taro.nishino [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.20
Fixed in: (no value)



Subject: dTRACE is nothing but ";" unless __ENABLE_TRACING__ is defined.
Hi Laye, dTRACE is nothing but ";" unless __ENABLE_TRACING__ is defined. ";" is, however, an empty statement! That is, the compilation unsupporting C99 should be failed. Also, besides there is a couple of ";;", which is of course an empty statement. As such, I made a diff which is attached. Regards, Taro
Subject: diff.txt
--- AI-MaxEntropy.xs.org Fri Mar 7 12:24:51 2008 +++ AI-MaxEntropy.xs Fri Mar 7 12:56:09 2008 @@ -69,7 +69,6 @@ SV* step SV* self PREINIT: - dTRACE("_neg_log_likelihood"); /* fetch the pre-cached samples and f_map */ SV* _c = *hvref_fetch(self, "_c"); struct samples_t* samples = @@ -85,12 +84,14 @@ /* intermediate variables */ AV* av_d_log_lh; char* smoother_type; - int i, j, x, y, lambda_i; + int i, j, y, lambda_i; double log_lh, sum_exp_lambda_f, sigma, fxy; double* lambda_f = (double*)malloc(sizeof(double) * y_num); double* exp_lambda_f = (double*)malloc(sizeof(double) * y_num); double* d_log_lh = (double*)malloc(sizeof(double) * f_num); double* lambda = (double*)malloc(sizeof(double) * f_num); + INIT: + dTRACE("_neg_log_likelihood"); CODE: /* initialize */ TRACE("enter"); @@ -158,7 +159,6 @@ double epsilon PREINIT: dSP; - dTRACE("_apply_gis"); /* fetch the pre-cached samples and f_map */ SV* _c = *hvref_fetch(self, "_c"); struct samples_t* samples = @@ -183,6 +183,8 @@ double* lambda = (double*)malloc(sizeof(double) * f_num); double* d_lambda = (double*)malloc(sizeof(double) * f_num); double* exp_lambda_f = (double*)malloc(sizeof(double) * y_num); + INIT: + dTRACE("_apply_gis"); CODE: TRACE("enter"); /* initiate lambda */ @@ -288,7 +290,7 @@ AV* samples = (AV*)SvRV(*hvref_fetch(self, "samples")); AV *sample, *x; struct samples_t* ss = - (struct samples_t*)malloc(sizeof(struct samples_t));; + (struct samples_t*)malloc(sizeof(struct samples_t)); int i, j; CODE: ss->s_num = av_len(samples) + 1; @@ -333,7 +335,7 @@ AV* f_map = (AV*)SvRV(*hvref_fetch(self, "f_map")); AV* f_map_y; struct f_map_t* fm = - (struct f_map_t*)malloc(sizeof(struct f_map_t));; + (struct f_map_t*)malloc(sizeof(struct f_map_t)); int i, j, x_num; CODE: fm->y_num = av_len(f_map) + 1;
Subject: Re: [rt.cpan.org #33868] dTRACE is nothing but ";" unless __ENABLE_TRACING__ is defined.
Date: Mon, 10 Mar 2008 15:40:04 +0800
To: bug-AI-MaxEntropy [...] rt.cpan.org
From: "Laye Suen" <cpan.laye [...] gmail.com>
Thanks Taro, Now I understand, the macro generates an empty statement in the declaration block, which make it failed in non-C99 compilation. I'll fix it in the next release. Regards, Laye On Fri, Mar 7, 2008 at 1:41 PM, Taro Nishino via RT < bug-AI-MaxEntropy@rt.cpan.org> wrote: Show quoted text
> > Fri Mar 07 00:40:58 2008: Request 33868 was acted upon. > Transaction: Ticket created by taro-nishino > Queue: AI-MaxEntropy > Subject: dTRACE is nothing but ";" unless __ENABLE_TRACING__ is > defined. > Broken in: 0.20 > Severity: Important > Owner: Nobody > Requestors: taro.nishino@gmail.com > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=33868 > > > > Hi Laye, > > dTRACE is nothing but ";" unless __ENABLE_TRACING__ is defined. ";" is, > however, an empty statement! That is, the compilation unsupporting C99 > should be failed. Also, besides there is a couple of ";;", which is of > course an empty statement. > As such, I made a diff which is attached. > > Regards, > Taro > > --- AI-MaxEntropy.xs.org Fri Mar 7 12:24:51 2008 > > +++ AI-MaxEntropy.xs Fri Mar 7 12:56:09 2008 > > @@ -69,7 +69,6 @@ > > SV* step > > SV* self > > PREINIT: > > - dTRACE("_neg_log_likelihood"); > > /* fetch the pre-cached samples and f_map */ > > SV* _c = *hvref_fetch(self, "_c"); > > struct samples_t* samples = > > @@ -85,12 +84,14 @@ > > /* intermediate variables */ > > AV* av_d_log_lh; > > char* smoother_type; > > - int i, j, x, y, lambda_i; > > + int i, j, y, lambda_i; > > double log_lh, sum_exp_lambda_f, sigma, fxy; > > double* lambda_f = (double*)malloc(sizeof(double) * y_num); > > double* exp_lambda_f = (double*)malloc(sizeof(double) * y_num); > > double* d_log_lh = (double*)malloc(sizeof(double) * f_num); > > double* lambda = (double*)malloc(sizeof(double) * f_num); > > + INIT: > > + dTRACE("_neg_log_likelihood"); > > CODE: > > /* initialize */ > > TRACE("enter"); > > @@ -158,7 +159,6 @@ > > double epsilon > > PREINIT: > > dSP; > > - dTRACE("_apply_gis"); > > /* fetch the pre-cached samples and f_map */ > > SV* _c = *hvref_fetch(self, "_c"); > > struct samples_t* samples = > > @@ -183,6 +183,8 @@ > > double* lambda = (double*)malloc(sizeof(double) * f_num); > > double* d_lambda = (double*)malloc(sizeof(double) * f_num); > > double* exp_lambda_f = (double*)malloc(sizeof(double) * y_num); > > + INIT: > > + dTRACE("_apply_gis"); > > CODE: > > TRACE("enter"); > > /* initiate lambda */ > > @@ -288,7 +290,7 @@ > > AV* samples = (AV*)SvRV(*hvref_fetch(self, "samples")); > > AV *sample, *x; > > struct samples_t* ss = > > - (struct samples_t*)malloc(sizeof(struct samples_t));; > > + (struct samples_t*)malloc(sizeof(struct samples_t)); > > int i, j; > > CODE: > > ss->s_num = av_len(samples) + 1; > > @@ -333,7 +335,7 @@ > > AV* f_map = (AV*)SvRV(*hvref_fetch(self, "f_map")); > > AV* f_map_y; > > struct f_map_t* fm = > > - (struct f_map_t*)malloc(sizeof(struct f_map_t));; > > + (struct f_map_t*)malloc(sizeof(struct f_map_t)); > > int i, j, x_num; > > CODE: > > fm->y_num = av_len(f_map) + 1; > > >
Subject: Re: [rt.cpan.org #33868] dTRACE is nothing but ";" unless __ENABLE_TRACING__ is defined.
Date: Tue, 11 Mar 2008 01:18:37 +0900
To: bug-AI-MaxEntropy [...] rt.cpan.org
From: Taro Nishino <taro.nishino [...] gmail.com>
Hi Laye, Show quoted text
> > Now I understand, the macro generates an empty statement in the > declaration block, which make it failed in non-C99 compilation. > > I'll fix it in the next release. >
Sorry for my bad command of English. What you are writing is just what I wanted to say. Regards, Taro
From: cpan.laye [...] gmail.com
Taro, Your English is very good. I just want to confirm my understanding. Thanks ^_^ On Mon Mar 10 12:18:59 2008, taro-nishino wrote: Show quoted text
> Hi Laye, >
> > > > Now I understand, the macro generates an empty statement in the > > declaration block, which make it failed in non-C99 compilation. > > > > I'll fix it in the next release. > >
> Sorry for my bad command of English. What you are writing is just what I > wanted to say. > > Regards, > Taro >