PR# 15573 Non-idiomatic usage of C preprocessor

Problem Report Summary
Submitter: saynte
Category: Runtime
Priority: Low
Date: 2009/04/01
Class: Bug
Severity: Non-critical
Number: 15573
Release: svn rev 77472
Confidential: No
Status: Analyzed
Responsible:
Environment: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.8) Gecko/2009032712 Ubuntu/9.04 (jaunty) Firefox/3.0.8
Synopsis: Non-idiomatic usage of C preprocessor

Description
Several portions of the C runtime are non-idiomatic. For instance, the dprintf macro is not capitalized, and is declared in about 8 different files (from a quick grep). This leads to quite strange things such as:

dprintf(2)(msg)

This should be a function contained in a single file, as it eliminates the possibility of conflicting redefinition in various files.

Similarly for flush, which is defined in 4 files, and also leads to strange things such as:

call1();
flush
call2();

#define'ing functions for speed in any case should probably just be an inline'd function anyway, providing the additional assurances of some type checking.
To Reproduce

										
Problem Report Interactions
From:manus_eiffel    Date:2009/04/02    Status: Analyzed    Download   
Thanks for your comment. Currently this code is actually not used (protected by #ifdef DEBUG) so we will put a low priority on this one.