Giter Club home page Giter Club logo

Comments (8)

danpovey avatar danpovey commented on September 12, 2024

Thanks for letting us know!
Guoguo, can you please look at this?
Dan

On Mon, Oct 5, 2015 at 11:07 AM, posophe [email protected] wrote:

Hello everyone !

RPMLint has noticed a code breaking in const-arpa-lm.cc with
-strict-alising.
I: Program is likely to break with new gcc. Try -fno-strict-aliasing.
W: kaldi strict-aliasing-punning const-arpa-lm.cc:551, 555, 580, 913

Kaldi has been built with gcc 5. The concerned lines are 551, 555, 580 and
913


Reply to this email directly or view it on GitHub
#205.

from kaldi.

chenguoguo avatar chenguoguo commented on September 12, 2024

I'm wondering what is the best way to fix this. What I have in mind is to
use union instead of reinterpret_cast, for example, define a union as
follows:

union Int32AndFloat {
int32 i;
float f;
};

Then we replace reinterpret_cast with this union. Any ideas? If you think
this is a good solution, I'll go ahead and apply the change.

Guoguo

On Mon, Oct 5, 2015 at 2:13 PM, Daniel Povey [email protected]
wrote:

Thanks for letting us know!
Guoguo, can you please look at this?
Dan

On Mon, Oct 5, 2015 at 11:07 AM, posophe [email protected] wrote:

Hello everyone !

RPMLint has noticed a code breaking in const-arpa-lm.cc with
-strict-alising.
I: Program is likely to break with new gcc. Try -fno-strict-aliasing.
W: kaldi strict-aliasing-punning const-arpa-lm.cc:551, 555, 580, 913

Kaldi has been built with gcc 5. The concerned lines are 551, 555, 580
and
913


Reply to this email directly or view it on GitHub
#205.


Reply to this email directly or view it on GitHub
#205 (comment).

from kaldi.

danpovey avatar danpovey commented on September 12, 2024

Hm.
I think it will be easier to add -fno-strict-aliasing to the
EXTRA_CXXFLAGS in lm/Makefile.
Dan

On Mon, Oct 5, 2015 at 5:36 PM, chenguoguo [email protected] wrote:

I'm wondering what is the best way to fix this. What I have in mind is to
use union instead of reinterpret_cast, for example, define a union as
follows:

union Int32AndFloat {
int32 i;
float f;
};

Then we replace reinterpret_cast with this union. Any ideas? If you think
this is a good solution, I'll go ahead and apply the change.

Guoguo

On Mon, Oct 5, 2015 at 2:13 PM, Daniel Povey [email protected]
wrote:

Thanks for letting us know!
Guoguo, can you please look at this?
Dan

On Mon, Oct 5, 2015 at 11:07 AM, posophe [email protected]
wrote:

Hello everyone !

RPMLint has noticed a code breaking in const-arpa-lm.cc with
-strict-alising.
I: Program is likely to break with new gcc. Try -fno-strict-aliasing.
W: kaldi strict-aliasing-punning const-arpa-lm.cc:551, 555, 580, 913

Kaldi has been built with gcc 5. The concerned lines are 551, 555, 580
and
913


Reply to this email directly or view it on GitHub
#205.


Reply to this email directly or view it on GitHub
#205 (comment).


Reply to this email directly or view it on GitHub
#205 (comment).

from kaldi.

danpovey avatar danpovey commented on September 12, 2024

Actually, after reading this intro to the strict-aliasing rule
http://cellperformance.beyond3d.com/articles/2006/06/understanding-strict-aliasing.html
I think it would be better to make it a union, as you suggested.
Dan

On Mon, Oct 5, 2015 at 7:00 PM, Daniel Povey [email protected] wrote:

Hm.
I think it will be easier to add -fno-strict-aliasing to the
EXTRA_CXXFLAGS in lm/Makefile.
Dan

On Mon, Oct 5, 2015 at 5:36 PM, chenguoguo [email protected]
wrote:

I'm wondering what is the best way to fix this. What I have in mind is to
use union instead of reinterpret_cast, for example, define a union as
follows:

union Int32AndFloat {
int32 i;
float f;
};

Then we replace reinterpret_cast with this union. Any ideas? If you think
this is a good solution, I'll go ahead and apply the change.

Guoguo

On Mon, Oct 5, 2015 at 2:13 PM, Daniel Povey [email protected]
wrote:

Thanks for letting us know!
Guoguo, can you please look at this?
Dan

On Mon, Oct 5, 2015 at 11:07 AM, posophe [email protected]
wrote:

Hello everyone !

RPMLint has noticed a code breaking in const-arpa-lm.cc with
-strict-alising.
I: Program is likely to break with new gcc. Try -fno-strict-aliasing.
W: kaldi strict-aliasing-punning const-arpa-lm.cc:551, 555, 580, 913

Kaldi has been built with gcc 5. The concerned lines are 551, 555, 580
and
913


Reply to this email directly or view it on GitHub
#205.


Reply to this email directly or view it on GitHub
#205 (comment).


Reply to this email directly or view it on GitHub
#205 (comment).

from kaldi.

chenguoguo avatar chenguoguo commented on September 12, 2024

Just sent a pull request... I'll use the union solution then..

Guoguo

On Mon, Oct 5, 2015 at 7:14 PM, Daniel Povey [email protected]
wrote:

Actually, after reading this intro to the strict-aliasing rule

http://cellperformance.beyond3d.com/articles/2006/06/understanding-strict-aliasing.html
I think it would be better to make it a union, as you suggested.
Dan

On Mon, Oct 5, 2015 at 7:00 PM, Daniel Povey [email protected] wrote:

Hm.
I think it will be easier to add -fno-strict-aliasing to the
EXTRA_CXXFLAGS in lm/Makefile.
Dan

On Mon, Oct 5, 2015 at 5:36 PM, chenguoguo [email protected]
wrote:

I'm wondering what is the best way to fix this. What I have in mind is
to
use union instead of reinterpret_cast, for example, define a union as
follows:

union Int32AndFloat {
int32 i;
float f;
};

Then we replace reinterpret_cast with this union. Any ideas? If you
think
this is a good solution, I'll go ahead and apply the change.

Guoguo

On Mon, Oct 5, 2015 at 2:13 PM, Daniel Povey [email protected]
wrote:

Thanks for letting us know!
Guoguo, can you please look at this?
Dan

On Mon, Oct 5, 2015 at 11:07 AM, posophe [email protected]
wrote:

Hello everyone !

RPMLint has noticed a code breaking in const-arpa-lm.cc with
-strict-alising.
I: Program is likely to break with new gcc. Try
-fno-strict-aliasing.
W: kaldi strict-aliasing-punning const-arpa-lm.cc:551, 555, 580, 913

Kaldi has been built with gcc 5. The concerned lines are 551, 555,
580
and
913


Reply to this email directly or view it on GitHub
#205.


Reply to this email directly or view it on GitHub
<#205 (comment)
.


Reply to this email directly or view it on GitHub
#205 (comment).


Reply to this email directly or view it on GitHub
#205 (comment).

from kaldi.

jtrmal avatar jtrmal commented on September 12, 2024

is this resolved?
@chenguoguo you can explicitly mention the PR # so that these two things would get crosslinked
Is it #211 ?

from kaldi.

chenguoguo avatar chenguoguo commented on September 12, 2024

Yeah it has been checked in.

Guoguo

On Fri, Oct 16, 2015 at 3:04 PM, jtrmal [email protected] wrote:

is this resolved?


Reply to this email directly or view it on GitHub
#205 (comment).

from kaldi.

jtrmal avatar jtrmal commented on September 12, 2024

Closing, as it's been resolved in #211

from kaldi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.