cc compilation : warning 474 : By default 'const' qualified objects are now stored in ... - HP UX

This is a discussion on cc compilation : warning 474 : By default 'const' qualified objects are now stored in ... - HP UX ; HP-UX ipas B.11.11 U 9000/785 Hi I am looking for the meaning of the following message (it is not identified in HP documentation, no more on the web) that is issued from a C compilation (cc compiler) : warning 474: ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: cc compilation : warning 474 : By default 'const' qualified objects are now stored in ...

  1. cc compilation : warning 474 : By default 'const' qualified objects are now stored in ...

    HP-UX ipas B.11.11 U 9000/785

    Hi
    I am looking for the meaning of the following message (it is not
    identified in HP documentation, no more on the web) that is issued from
    a C compilation (cc compiler) :
    warning 474: By default 'const' qualified objects are now stored in
    literal space using +ESconstlit. This may lead to run-time errors if
    the semantics of 'const' are violated.

    In addition, the concerned source line is not indicated ...
    Thanks for any idea


  2. Re: cc compilation : warning 474 : By default 'const' qualified objectsare now stored in ...

    awalter1 wrote:
    > I am looking for the meaning of the following message that is issued from
    > a C compilation (cc compiler) :
    > warning 474: By default 'const' qualified objects are now stored in
    > literal space using +ESconstlit. ...


    Warning 474 is saying that the default used to be +ESnolit and now it
    has changed to +ESlitconst. This means you can't modify literals.

    http://docs.hp.com/en/5969-4407/ch01s03.html

    The corresponding aC++ change was documented in:
    http://docs.hp.com/en/5969-7865/ch01s02.html


    > the concerned source line is not indicated ...


    This message occurs everytime you invoke the compiler with +w1.
    Unless you use +W474 to suppress or use +ESconstlit to confirm you
    want the new default.

    The next release on IPF will have the default changed to +Olit=all,
    to match gcc.


  3. Re: cc compilation : warning 474 : By default 'const' qualified objects are now stored in ...

    very clear expertise.
    Thanks a lot

    On 27 jan, 10:53, Dennis Handly wrote:
    > awalter1 wrote:
    > > I am looking for the meaning of the following message that is issued from
    > > a C compilation (cc compiler) :
    > > warning 474: By default 'const' qualified objects are now stored in
    > > literal space using +ESconstlit. ...Warning 474 is saying that the default used to be +ESnolit and now it

    > has changed to +ESlitconst. This means you can't modify literals.
    >
    > http://docs.hp.com/en/5969-4407/ch01s03.html
    >
    > The corresponding aC++ change was documented in:http://docs.hp.com/en/5969-7865/ch01s02.html
    >
    > > the concerned source line is not indicated ...This message occurs everytime you invoke the compiler with +w1.

    > Unless you use +W474 to suppress or use +ESconstlit to confirm you
    > want the new default.
    >
    > The next release on IPF will have the default changed to +Olit=all,
    > to match gcc.



+ Reply to Thread