Issue Details (XML | Word | Printable)

Key: PCC-479
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Anders Magnusson
Reporter: rl
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
pcc

CLONE -build with --disable-gcc-compat fails

Created: 24/Aug/14 03:54 PM   Updated: 24/Aug/14 05:00 PM
Component/s: amd64 target
Affects Version/s: None
Fix Version/s: None

Environment: x86_64 Linux 3.x, static uclibc 0.9.29, pcc as of 2014-05-14, with gcc-compatibility


 Description  « Hide
arch/amd64/code.c contains a reference to GCC_ATYP_PACKED
which makes the build with --disable-gcc-compat fail:

pcc -g -O2 -Wall -Wmissing-prototypes -Wshadow -Wsign-compare -Wtruncate -DPCC_DEBUG -D_ISOC99_SOURCE -Dos_linux -Dmach_amd64 -I. -I. -I../.. -I../../mip -I../../arch/amd64 -I../../os/linux -c -o code.o ../../arch/amd64/code.c
../../arch/amd64/code.c:175: warning: conversion from 'long' to 'int' may alter its value
../../arch/amd64/code.c:255: warning: conversion from 'int' to 'short' may alter its value
../../arch/amd64/code.c:266: warning: conversion from 'int' to 'short' may alter its value
../../arch/amd64/code.c:278: warning: conversion from 'int' to 'short' may alter its value
../../arch/amd64/code.c:285: warning: conversion from 'long' to 'int' may alter its value
../../arch/amd64/code.c:569: warning: conversion from 'long' to 'int' may alter its value
../../arch/amd64/code.c:676: warning: conversion from 'long' to 'int' may alter its value
../../arch/amd64/code.c, line 681: GCC_ATYP_PACKED undefined
../../arch/amd64/code.c:745: warning: conversion from 'long' to 'int' may alter its value
../../arch/amd64/code.c:794: warning: conversion from 'long' to 'int' may alter its value
../../arch/amd64/code.c:887: warning: conversion from 'long' to 'int' may alter its value
../../arch/amd64/code.c:954: warning: conversion from 'long' to 'int' may alter its value
../../arch/amd64/code.c:978: warning: conversion from 'long' to 'int' may alter its value
[XXXXXXXX]/top/libexec/ccom terminated with status 1


 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
rl added a comment - 24/Aug/14 03:55 PM
unfortunately there are more things lurking in the dark for --disable-gcc-compat:

pcc -g -O2 -Wall -Wmissing-prototypes -Wshadow -Wsign-compare -Wtruncate -DPCC_DEBUG -D_ISOC99_SOURCE -Dos_linux -Dmach_amd64 -I. -I. -I../.. -I../../mip -I../../arch/amd64 -I../../os/linux -c -o local.o ../../arch/amd64/local.c
../../arch/amd64/local.c, line 105: GCC_ATYP_VISIBILITY undefined
../../arch/amd64/local.c:109: warning: no previous prototype for `picsymtab'
../../arch/amd64/local.c, line 109: warning: illegal combination of pointer and integer
../../arch/amd64/local.c:110: warning: conversion from 'int' to 'short' may alter its value
../../arch/amd64/local.c:142: warning: conversion from 'unsigned long' to 'int' may alter its value
../../arch/amd64/local.c:146: warning: no previous prototype for `strlcpy'
../../arch/amd64/local.c:147: warning: no previous prototype for `strlcat'
../../arch/amd64/local.c:148: warning: no previous prototype for `strlcat'
../../arch/amd64/local.c:750: warning: conversion from 'long' to 'int' may alter its value
../../arch/amd64/local.c:784: warning: conversion from 'unsigned long' to 'int' may alter its value
../../arch/amd64/local.c:845: warning: conversion from 'int' to 'short' may alter its value
error: ....../libexec/ccom terminated with status 1

rl added a comment - 24/Aug/14 04:27 PM
pcc -B.... -B.... -I..../include -O -DSOFTFLOAT_FOR_GCC -I. -I./arch/amd64 -isystem ../libpcc/include -c bits64/softfloat.c
bits64/softfloat-macros, line 43: gcc attribute used
bits64/softfloat-macros, line 43: gcc attribute used
bits64/softfloat-macros, line 43: gcc attribute used
bits64/softfloat-macros, line 70: gcc attribute used
bits64/softfloat-macros, line 70: gcc attribute used
bits64/softfloat-macros, line 70: gcc attribute used
bits64/softfloat-macros, line 107: gcc attribute used
bits64/softfloat-macros, line 107: gcc attribute used
bits64/softfloat-macros, line 107: gcc attribute used
bits64/softfloat-macros, line 107: gcc attribute used
bits64/softfloat-macros, line 107: gcc attribute used
bits64/softfloat-macros, line 145: gcc attribute used
bits64/softfloat-macros, line 145: gcc attribute used
bits64/softfloat-macros, line 145: gcc attribute used
bits64/softfloat-macros, line 145: gcc attribute used
bits64/softfloat-macros, line 145: gcc attribute used
bits64/softfloat-macros, line 181: gcc attribute used
bits64/softfloat-macros, line 181: gcc attribute used
bits64/softfloat-macros, line 181: gcc attribute used
bits64/softfloat-macros, line 181: gcc attribute used
bits64/softfloat-macros, line 181: gcc attribute used
bits64/softfloat-macros, line 233: gcc attribute used
bits64/softfloat-macros, line 234: gcc attribute used
bits64/softfloat-macros, line 235: gcc attribute used
bits64/softfloat-macros, line 236: gcc attribute used
bits64/softfloat-macros, line 237: gcc attribute used
bits64/softfloat-macros, line 238: gcc attribute used
bits64/softfloat-macros, line 240: gcc attribute used
bits64/softfloat-macros, line 292: gcc attribute used
bits64/softfloat-macros, line 292: gcc attribute used
bits64/softfloat-macros, line 292: gcc attribute used
bits64/softfloat-macros, line 292: compiler error: too many errors
error: ...../libexec/ccom terminated with status 1

rl added a comment - 24/Aug/14 04:57 PM
the latter looks like only supporting K&R:

int f( int i )
{
  return 0;
}

leads to "line 1: gcc attribute used"
but

int f( i )
int i;
{
  return 0;
}

compiles without diagnostics

It looks like anything beyond K&R is only available in the gcc-compatibility mode, is this expected?

rl added a comment - 24/Aug/14 05:00 PM
The environment is pcc as of 2014-08-24