Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 412273

Summary: dev-embedded/avr-libc-1.8.0 probable preprocessor mistake in inttypes.h
Product: Gentoo Linux Reporter: Christopher Head <bugs>
Component: [OLD] DevelopmentAssignee: Embedded Team (OBSOLETE) <dev-embedded+disabled>
Status: VERIFIED UPSTREAM    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Christopher Head 2012-04-17 03:06:04 UTC
In /usr/avr/include/inttypes.h appears the following code:

#ifdef __avr_libc_does_not_implement_hh_in_scanf

#define		SCNd8			"hhd"
#define		SCNdLEAST8		"hhd"
#define		SCNdFAST8		"hhd"

#define		SCNi8			"hhi"
#define		SCNiLEAST8		"hhi"
#define		SCNiFAST8		"hhi"

#endif

This preprocessor check looks crazy: if the "hh" format is *not* implemented, then go ahead and define a bunch of macros that *use* it? I think this should be ifndef, shouldn't it? Something similar is going on with __avr_libc_does_not_implement_long_long_in_printf_or_scanf in three places as well as a second instance of __avr_libc_does_not_implement_hh_in_scanf.

Reproducible: Always
Comment 1 SpanKY gentoo-dev 2013-06-30 06:01:11 UTC
this should be filed here:
https://savannah.nongnu.org/bugs/?group=avr-libc