Project

General

Profile

Actions

Bug #2403

closed

Bug #1450: Illumos should be buildable with GCC4

pcisch could avoid type promotion

Added by Rich Lowe over 9 years ago. Updated over 9 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
kernel
Start date:
2012-03-13
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

There's a debug printf in pcisch which causes compiler weirdness relating to implicit types

We do, in effect,

  printf("%lx", ((foo & 0xfffull) >> 25));

This causes GCC to type the printf argument as unsigned long long (because of the specifier on the shift), but studio not to. Meaning that there's no way to appease their respective format string checking (note that the types happen to be always the same size, so nothing actually goes wrong).

As best as I can tell, the use of 'ull' was to force things to be 64bit even on 32bit SPARC, which hasn't existed for approaching a decade, qualifying them to unsigned long (still 64bit), makes everythig happy.

Actions #1

Updated by Rich Lowe over 9 years ago

  • Status changed from New to Resolved
  • % Done changed from 80 to 100

Resolved in r13638 commit:8dacb0cc3292

Actions

Also available in: Atom PDF