AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
#Power
 View Only
  • 1.  warnings and solution

    Posted Tue March 31, 2009 04:55 AM

    Originally posted by: SystemAdmin


    Hello experts ,

    as i am new to AIX i am not getting the meaning of these warnings, and how to resolve them
    i am using AIX 5.3
    bold
    1540-0053 (W) The declaration of a class member within the class definition must not be qualified.

    "/usr/include/alloca.h", line 34.9: 1540-1401 (I) An unknown "pragma __alloca" is specified.
    bold
    i am not getting what these two warnings stands for,
    how to resolve them whether we can neglect them or they have any performance issue please help me to solve this.
    #AIX-Forum


  • 2.  Re: warnings and solution

    Posted Tue April 07, 2009 07:22 PM

    Originally posted by: SystemAdmin


    What are you doing that generates the warnings? It sounds as though you are compiling a C program. Does /usr/include/alloca.h exist? Does if contain a line with __alloca in it?
    #AIX-Forum


  • 3.  Re: warnings and solution

    Posted Wed April 08, 2009 02:13 AM

    Originally posted by: SystemAdmin


    thank you for the reply,

    yes the header file exists at /usr/inlude/alloca.h

    #ifndef _H_ALLOCA
    #define _H_ALLOCA
    #include <sys/types.h>
    #ifdef __cplusplus
    extern "C" {
    #endif

    #ifdef __GNUC__
    /* Remove any previous definitions. */
    #undef alloca

    #define alloca(size) __builtin_alloca (size)

    #else /* xlc */

    35:[b]#pragma alloca[/b] //it is showing at this line

    #endif /* GCC. */

    #ifdef __cplusplus
    }
    #endif

    #endif /* _H_ALLOCA */

    it is showing at line number 35 , please tell me what is the significance of this warning.
    #AIX-Forum


  • 4.  Re: warnings and solution

    Posted Tue April 14, 2009 02:48 AM

    Originally posted by: SystemAdmin


    please provide the solution.
    #AIX-Forum


  • 5.  Re: warnings and solution

    Posted Tue April 14, 2009 07:07 AM

    Originally posted by: j.gann


    it is not really that hard to guess: try a compiler that knows the #pragma alloca
    #AIX-Forum


  • 6.  Re: warnings and solution

    Posted Wed April 15, 2009 11:13 PM

    Originally posted by: SystemAdmin


    thank you for the reply, but please tell me whether this warning can be ignored,
    or it will have impact on the code, whether is this is a common warning, please tell me significance of this warning , whether this can be handled by gcc compiler.

    please provide some more info.
    #AIX-Forum


  • 7.  Re: warnings and solution

    Posted Thu April 16, 2009 06:05 AM

    Originally posted by: SystemAdmin


    please reply.
    #AIX-Forum


  • 8.  Re: warnings and solution

    Posted Mon April 20, 2009 04:10 AM

    Originally posted by: SystemAdmin


    please reply for my question.
    #AIX-Forum


  • 9.  Re: warnings and solution

    Posted Tue April 21, 2009 01:20 AM

    Originally posted by: esv


    Hi,

    I doubt anyone would follow up on this particular topic, however I want to share this with you so have a better chance to get an answer...

    http://www.catb.org/~esr/faqs/smart-questions.html

    best regards,
    esv.
    #AIX-Forum


  • 10.  Re: warnings and solution

    Posted Wed August 10, 2011 03:53 AM

    Originally posted by: SystemAdmin


    Hi buddym use the below in your code.

    Yes there will be impact on your code if you avoid this warning.

    I use this its works fine to me. LIknk for hte same - http://cs.nyu.edu/exact/core/download/getopt.c
    #ifdef __GNUC__
    #define alloca __builtin_alloca
    #else /* not __GNUC__ */
    #if defined(sparc) && !defined(USG) && !defined(SVR4) && !defined(__svr4__)
    #include <alloca.h>
    #else
    #ifdef _AIX
    #pragma alloca
    #else
    #if defined (_MSC_VER)
    #include <malloc.h>
    #else
    char *alloca ();
    #endif
    #endif
    #endif /* sparc */
    #endif /* not __GNUC__ */
    #AIX-Forum