- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- error #2029: expected an expression
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
тАО05-01-2011 11:50 PM
тАО05-01-2011 11:50 PM
HP-UX hpx418 B.11.23 U ia64 1139467043 unlimited-user license
aCC: HP C/aC++ B3910B A.06.25.01 [May 16 2010]
---- hp_uuu.cpp ---
int main()
{
long int x = ({ long int __result; __result = 131; __result; });
return 0;
}
-------------------
====== Compilation ======
> aCC hp_uuu.cpp
"hp_uuu.cpp", line 3: error #2029: expected an expression
long int x = ({ long int __result; __result = 131; __result; });
^
1 error detected in the compilation of "hp_uuu.cpp".
=========================
Cpmpilers SUN CC, AIX xlC, Intel ixpc have np problem with that code.
CC: Sun C++ 5.11 SunOS_sparc 2010/08/13
IBM XL C/C++ for AIX, V10.1
Version: 10.01.0000.0000
Intel(R) C++ Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 12.0.0.084 Build 20101006
Copyright (C) 1985-2010 Intel Corporation. All rights reserved.
Solved! Go to Solution.
- Tags:
- gcc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-02-2011 12:06 AM
тАО05-02-2011 12:06 AM
Re: error #2029: expected an expression
dangerous, but what's the value of a "{}"
code block supposed to be?
Around here:
alp $ cxx hp_uuu.cpp
long int x = ({ long int __result; __result = 131; __result; });
..............^
%CXX-E-EXPPRIMEXPR, expected an expression
at line number 3 in file ALP$DKC0:[SMS.ITRC]hp_uuu.cpp;1
%CXX-I-MESSAGE, 1 error detected in the compilation of "ALP$DKC0:[SMS.ITRC]hp_uuu.cpp;1".
(With a fixed-width font, that "^" points to
the "{".)
alp $ cxx /version
HP C++ V7.3-009 for OpenVMS Alpha V8.3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-02-2011 12:22 AM
тАО05-02-2011 12:22 AM
Re: error #2029: expected an expression
From:
http://www.beastsoft.net/trac/gmediaserver/browser/src/tempfailure.h?order=name
26 /* TEMP_FAILURE_RETRY uses ({ }) syntax which is probably only supported
27 * by GCC. That is why this file is not in Gnulib.
28 */
29
30 #ifndef TEMP_FAILURE_RETRY
31 #define TEMP_FAILURE_RETRY(expression) \
32 ({ \
33 long int _result; \
34 do _result = (long int) (expression); \
35 while (_result == -1L && errno == EINTR); \
36 _result; \
37 })
38 #endif
But why is that compiled on SUN CC, AIX xlC and Intel icpc?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-02-2011 07:21 AM
тАО05-02-2011 07:21 AM
Re: error #2029: expected an expression
> and Intel icpc?
Are you asking why all C++ compilers are not
exactly equivalent? I can think at least one
possible reason for this.
> [...] what's the value of a "{}"
> code block supposed to be?
Still wondering.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-02-2011 11:13 AM
тАО05-02-2011 11:13 AM
Solution>Steven: but what's the value of a "{}" code block supposed to be?
__result:
http://gcc.gnu.org/onlinedocs/gcc/Statement-Exprs.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-02-2011 12:51 PM
тАО05-02-2011 12:51 PM
Re: error #2029: expected an expression
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-02-2011 07:38 PM
тАО05-02-2011 07:38 PM
Re: error #2029: expected an expression
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-03-2011 01:03 AM
тАО05-03-2011 01:03 AM
Re: error #2029: expected an expression
In A.06.26, this will be enabled by default.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-03-2011 02:37 AM
тАО05-03-2011 02:37 AM