- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Automatic aggregate error when compiling esql-c
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-27-2007 11:21 PM
тАО09-27-2007 11:21 PM
We are having a problem compiling an esql-c program on HP-UX 11.11.(64-bit). This progam previously compiled OK on HP-UX 11.00 32-bit.
cc: "gmin2113.ec", line 130: error 1716: Automatic aggregate initialization is a
n ANSI feature.
It is complaining about the following line:
datetime year to second sql_last_rec;
The sql_last_rec variable has to be a datetime type (and not char) because it is reading a datetime type from our informix database.
The easy way to get around this would be to change the flag on the compilation from -Ac to -Aa and compile it as ansi C. However we have include files which are externally generated (which we can't change) and which definitely won't compile as -Aa.
Is there anyway around this?
Many thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-28-2007 03:31 AM
тАО09-28-2007 03:31 AM
Solutionexpands into (that is, what, exactly is on
"gmin2113.ec", line 130), but ...
> Automatic aggregate initialization is an
> ANSI feature.
If you can find a way to stick a "static" in
there somewhere to make the troublesome
variable static instead of automatic, then
the complaint should disappear.
The last time I saw one of these was this:
(Bundled) cc: "unzip.c", line 886: error
1716: Automatic aggregate initialization is
an ANSI feature.
The required change was from:
uch test_buf[ 2] = { 'a', 'b' };
to:
static uch test_buf[ 2] = { 'a', 'b' };
Which was easy enough to do, but I had easy
access to the actual C code involved.
> However we have include files [...]
Shouldn't there be a magic #pragma to let you
fiddle with this stuff on the fly?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-28-2007 07:25 PM
тАО09-28-2007 07:25 PM
Re: Automatic aggregate error when compiling esql-c
Instead compile with -Ae, ANSI with extensions.
>we have include files which are externally generated (which we can't change) and which definitely won't compile as -Aa.
Why do you say that? There are very few K&R constructs that won't compile with -Ae. A list of errors would be helpful here.
>Steven: Shouldn't there be a magic #pragma to let you fiddle with this stuff on the fly?
Not that I know of. You shouldn't have K&R code because K&R isn't supported on IPF.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-04-2007 11:07 PM
тАО10-04-2007 11:07 PM
Re: Automatic aggregate error when compiling esql-c
I'm sorry I'm only getting back to you now.
Dennis - compiling with -Ae didn't work. There were lots of errors similar to -Ac.
Steven - adding in static solved my problem! I'm still not sure what automatic aggregation means though.
Thank you very much for your help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-05-2007 01:54 AM
тАО10-05-2007 01:54 AM
Re: Automatic aggregate error when compiling esql-c
> aggregation means though.
Neither am I, but "automatic aggregate
initialization" is what happens when you
initialize an automatic aggregate. That is,
when you specify initial values for an
aggregate (a structure, union, or array (as
in my example)), which is automatic, (not
"static"), that is, the storage for the
entity may be used for other purposes outside
the scope of its declaration.
In real life, the compiler can normally tell
the linker to set the initial values for a
static entity, but the compiler needs to
generate actual code to do the initialization
for an automatic entity, and the crippled
bundled C compiler in HP-UX may be willing
and able to do the first job, but is unable
(or unwilling) to do the second job (which
was my problem). Similarly, if you cripple
the extra-cost C compiler with enough of the
right options, you can apparently get the
same effect.
For more details, you could consult a C
language manual or Google.
Not being able to see any of your actual C
code makes it hard to say exactly what's true
in your case.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-05-2007 03:49 AM
тАО10-05-2007 03:49 AM
Re: Automatic aggregate error when compiling esql-c
What were they?
>Steven: "automatic aggregate initialization" is what happens when you initialize an automatic aggregate.
That's correct. Initializing auto local variables. (Autos are locals and parms.)
>the compiler can normally tell the linker to set the initial values for a static entity,
Except in the case for C++ static initializers.