Bug 244696 - syntax error in include/asm/page.h?
Summary: syntax error in include/asm/page.h?
Status: CLOSED DUPLICATE of bug 244695
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel   
(Show other bugs)
Version: rawhide
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Brian Brock
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-06-18 16:20 UTC by Jonathan Kamens
Modified: 2007-11-30 22:12 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-06-18 16:21:41 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Jonathan Kamens 2007-06-18 16:20:42 UTC
Trying to compile the VMware modules with 2.6.21-1.3223.fc8, I get:

include/asm/page.h: In function 'pte_t native_make_pte(long unsigned int)':
include/asm/page.h:112: error: expected primary-expression before ')' token
include/asm/page.h:112: error: expected ';' before '{' token
include/asm/page.h:112: error: expected primary-expression before '.' token
include/asm/page.h:112: error: expected `;' before '}' token

Note that this particular file is being compiled in C++ mode, not C mode.  The 
function in question is:

static inline pte_t native_make_pte(unsigned long val)
{
      return (pte_t) { .pte_low = val };
}

I made the problem go away by changing it to this:

static inline pte_t native_make_pte(unsigned long val)
{
  pte_t ret;
  ret.pte_low = val;
  return ret;
  /*    return (pte_t) { .pte_low = val }; */
}

I can't claim to understand the niceties of C++ syntax enough to understand why 
the C++ compiler didn't like the previous syntax, nor do I know whether this is 
a problem with the header file or a problem with g++ (gcc-c++-4.1.2-13 is what 
I've got), so I'm making a best guess and filing under kernel.  Please reassign 
if appropriate.

Comment 1 Jonathan Kamens 2007-06-18 16:21:41 UTC

*** This bug has been marked as a duplicate of 244695 ***


Note You need to log in before you can comment on or make changes to this bug.