]> gcc.gnu.org Git - gcc.git/blame - gcc/c/ChangeLog
re PR bootstrap/66252 (bootstrap comparison failures on sparc-linux)
[gcc.git] / gcc / c / ChangeLog
CommitLineData
13fdf2e2
AM
12015-06-08 Andrew MacLeod <amacleod@redhat.com>
2
3 * c-array-notation.c : Adjust include files.
4 * c-aux-info.c : Likewise.
5 * c-convert.c : Likewise.
6 * c-decl.c : Likewise.
7 * c-errors.c : Likewise.
8 * c-lang.c : Likewise.
9 * c-lang.h : Likewise.
10 * c-objc-common.c : Likewise.
11 * c-parser.c : Likewise.
12 * c-typeck.c : Likewise.
13
d7438551
AH
142015-06-05 Aldy Hernandez <aldyh@redhat.com>
15
16 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
17 immediately clobber it.
18 (c_write_global_declarations_1): Remove call to
19 check_global_declaration_1.
20 (c_write_global_declarations_2): Remove.
21 (c_write_final_cleanups): Rename from c_write_global_declarations.
22 Remove call to finalize_compilation_unit.
23 Remove calls to debugging hooks.
24 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
25 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
26 * c-tree.h: Remove c_write_global_declarations.
27
ecb9f223
AM
282015-06-04 Andrew MacLeod <amacleod@redhat.com>
29
30 * c-array-notation.c: Adjust includes for restructured coretypes.h.
31 * c-aux-info.c: Likewise.
32 * c-convert.c: Likewise.
33 * c-decl.c: Likewise.
34 * c-errors.c: Likewise.
35 * c-lang.c: Likewise.
36 * c-objc-common.c: Likewise.
37 * c-parser.c: Likewise.
38 * c-typeck.c: Likewise.
39
9482b620
MP
402015-06-04 Marek Polacek <polacek@redhat.com>
41
42 PR c/66341
43 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
44 it is a lvalue.
45
bc51ace3
PK
462015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
47
48 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
49 Warn for empty struct.
50 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
51
ea5b45b6
AT
522015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
53
54 * c-decl.c (start_function): Call plugin before parsing.
55 (finish_function): Call plugin after parsing.
56
c2d47482
PK
572015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
58
59 PR c/49551
60 * c-decl.c (merge_decls): Merge DECL_COMMON.
61
a95492ab
JW
622015-05-22 Jim Wilson <jim.wilson@linaro.org>
63
64 * Make-lang.in (check_gcc_pallelize): Define.
65
fd5c817a
MP
662015-05-22 Marek Polacek <polacek@redhat.com>
67
68 PR c/47043
69 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
70 attributes.
71
c7b70a3c
MP
722015-05-21 Marek Polacek <polacek@redhat.com>
73
74 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
75 DECL_BUILT_IN.
76
21b634ae
MP
772015-05-20 Marek Polacek <polacek@redhat.com>
78
79 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
80 * c-typeck.c: Likewise.
81
296a8c2f
MP
822015-05-19 Marek Polacek <polacek@redhat.com>
83
84 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
85
41b37d5e
JJ
862015-05-19 Jakub Jelinek <jakub@redhat.com>
87
88 PR middle-end/66199
89 * c-parser.c (c_parser_omp_for_loop): Don't add
90 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
91 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
92 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
93 constructs.
94
fab27f52
MM
952015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
96
97 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 98 swaps.
fab27f52 99
40de31cf
MLI
1002015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
101
102 PR fortran/44054
103 * c-objc-common.c (c_tree_printer): Replace locus pointer with
104 accessor function.
105
3aa3c9fc
MP
1062015-05-14 Marek Polacek <polacek@redhat.com>
107
108 PR c/66066
109 PR c/66127
110 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
111 rather than with 0.
112
c3388e62
DM
1132015-05-12 David Malcolm <dmalcolm@redhat.com>
114
115 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
116 to add a call to warn_for_misleading_indentation.
117 (c_parser_else_body): Likewise, adding param "else_loc".
118 (c_parser_if_statement): Check for misleading indentation.
119 (c_parser_while_statement): Likewise.
120 (c_parser_for_statement): Likewise.
121
755e528f
MP
1222015-05-08 Marek Polacek <polacek@redhat.com>
123
124 PR c/64918
125 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
126 (output_init_element): Likewise.
127
0173bd2a
MP
1282015-05-07 Marek Polacek <polacek@redhat.com>
129
130 PR c/65179
131 * c-typeck.c (build_binary_op): Warn when left shifting a negative
132 value.
133
9babc352
MP
1342015-04-30 Marek Polacek <polacek@redhat.com>
135
136 * c-typeck.c (set_init_label): Call error_at instead of error and
137 pass LOC to it.
138
ac9f18db
MP
139 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
140 the type of a decl.
141
ec3fba51
MP
142 * c-typeck.c (c_build_va_arg): Clarify the error message.
143
b811915d
TS
1442015-04-29 Thomas Schwinge <thomas@codesourcery.com>
145
146 * c-parser.c (c_parser_oacc_enter_exit_data): Use
147 OMP_STANDALONE_CLAUSES.
148
f3075008
MP
1492015-04-28 Marek Polacek <polacek@redhat.com>
150
151 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
152
4e81b788
MP
1532015-04-28 Marek Polacek <polacek@redhat.com>
154
155 PR c/65901
156 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
157
6c1db78e
MP
1582015-04-25 Marek Polacek <polacek@redhat.com>
159
160 PR c/52085
161 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
162 attribute.
163
5c4abbb8
MP
1642015-04-23 Marek Polacek <polacek@redhat.com>
165
166 PR c/65345
167 * c-decl.c (set_labels_context_r): New function.
168 (store_parm_decls): Call it via walk_tree_without_duplicates.
169 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
170 instead of create_tmp_var. Build TARGET_EXPR instead of
171 COMPOUND_EXPR.
172 (build_atomic_assign): Use create_tmp_var_raw instead of
173 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
174
06aca1d5
IV
1752015-04-20 Ilya Verbin <ilya.verbin@intel.com>
176
177 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
178 (c_parser_omp_target_update): Add missed %> to error_at ().
179
8fba1830
BRF
1802015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
181
182 PR target/55143
183 * c-decl.c (c_default_pointer_mode): Remove definition.
184 * c-tree.h (c_default_pointer_mode): Remove declaration.
185
62021f64
TB
1862015-03-27 Tobias Burnus <burnus@net-b.de>
187
188 PR c/65586
189 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
190 error out.
191 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
192 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
193 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
194
9b65e171
JJ
1952015-03-19 Jakub Jelinek <jakub@redhat.com>
196
197 * c-decl.c (c_decl_attributes): Also add "omp declare target"
198 attribute for DECL_EXTERNAL VAR_DECLs.
199
17958621
JJ
2002015-03-11 Jakub Jelinek <jakub@redhat.com>
201
202 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
203 argument.
204
7ccb1a11
JJ
2052015-03-10 Jakub Jelinek <jakub@redhat.com>
206
207 PR c/65120
208 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
209 before preparing arguments to warn_logical_not_parentheses.
210
01177669
JJ
2112015-03-09 Jakub Jelinek <jakub@redhat.com>
212
213 PR c/65120
214 * c-typeck.c (parser_build_binary_op): Don't warn for
215 !!x == y or !b == y where b is _Bool.
216
802ac282
MP
2172015-03-09 Marek Polacek <polacek@redhat.com>
218
219 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
220 * c-decl.c (grokdeclarator): Likewise.
221 * c-typeck.c (build_binary_op): Likewise.
222
e5165b60
MP
2232015-02-27 Marek Polacek <polacek@redhat.com>
224
225 PR c/65228
226 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
227
065d214c
MP
2282015-02-14 Marek Polacek <polacek@redhat.com>
229
230 PR c/64768
231 * c-decl.c (grokdeclarator): Set the range of a flexible array member
232 declared through a typedef name.
233
e5d9235b
MP
2342015-02-13 Marek Polacek <polacek@redhat.com>
235
236 PR c/65050
237 * c-decl.c (grokdeclarator): Print also the type when giving
238 the error message about array's incomplete element type.
239
fa01ffcc
JJ
2402015-02-11 Jakub Jelinek <jakub@redhat.com>
241
242 PR c/64824
243 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
244 check in the POP macro.
245
c3e38a03
MP
2462015-02-09 Marek Polacek <polacek@redhat.com>
247
248 PR c/64856
249 * c-typeck.c (process_init_element): Don't always wrap
250 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
251 initializing a range of elements.
252
4886ec8e
JJ
2532015-02-04 Jakub Jelinek <jakub@redhat.com>
254
255 PR c/64824
256 PR c/64868
257 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
258
c3e38a03 2592015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
260
261 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
262 processing enum declaration.
263
7b33f0c8
MP
2642015-01-29 Marek Polacek <polacek@redhat.com>
265
266 PR c/64709
267 * c-typeck.c (pop_init_level): If constructor_elements has
268 exactly one element with integer_zerop value, set constructor_zeroinit
269 to 1. Remove braces around warning_init call.
270
dea63e49
JJ
2712015-01-27 Jakub Jelinek <jakub@redhat.com>
272
273 PR c/64766
274 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
275 of FUNCTION_DECLs with error_mark_node.
276
d38f7dce
JJ
2772015-01-26 Jakub Jelinek <jakub@redhat.com>
278
279 PR c/64778
280 * c-typeck.c (convert_arguments): Return -1 if there are
281 error_args, even if we've diagnosed too many arguments.
282
cbf5d0e7
RB
2832015-01-21 Richard Biener <rguenther@suse.de>
284
285 PR middle-end/64313
286 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
287 for builtins the user declared correctly.
288
41dbbb37
TS
2892015-01-15 Thomas Schwinge <thomas@codesourcery.com>
290 Bernd Schmidt <bernds@codesourcery.com>
291 Cesar Philippidis <cesar@codesourcery.com>
292 James Norris <jnorris@codesourcery.com>
293 Jakub Jelinek <jakub@redhat.com>
294 Ilmir Usmanov <i.usmanov@samsung.com>
295
296 * c-parser.c: Include "gomp-constants.h".
297 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
298 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
299 Use OMP_CLAUSE_SET_MAP_KIND.
300 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
301 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
302 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
303 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
304 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
305 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
306 "copyout", "create", "delete", "deviceptr", "gang", "host",
307 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
308 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
309 "present_or_create", "pcreate", "seq", "self", "vector",
310 "vector_length", "wait", "worker".
311 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
312 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
313 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
314 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
315 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
316 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
317 (c_parser_oacc_data_clause_deviceptr)
318 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
319 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
320 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
321 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
322 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
323 (c_parser_oacc_parallel, c_parser_oacc_update)
324 (c_parser_oacc_wait): New functions.
325 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
326 (c_finish_oacc_data): New prototypes.
327 * c-typeck.c: Include "gomp-constants.h".
328 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
329 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
330 OMP_CLAUSE_SET_MAP_KIND.
331 (c_finish_oacc_parallel, c_finish_oacc_kernels)
332 (c_finish_oacc_data): New functions.
333 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
334 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
335 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
336 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
337 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
338 GOMP_MAP_FORCE_DEVICEPTR.
339
adfac8df
JJ
3402015-01-09 Michael Collison <michael.collison@linaro.org>
341
342 * c-array-notation.c: Include hash-set.h, machmode.h,
343 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
344 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
345 * c-aux-info.c: Ditto.
346 * c-convert.c: Ditto.
347 * c-decl.c: Ditto.
348 * c-errors.c: Ditto.
349 * c-lang.c: Dittoxs.
350 * c-objc-common.c: Ditto.
351 * c-parser.c: Ditto.
352 * c-typeck.c: Include hash-set.h, machmode.h,
353 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
354 fold-const.h, wide-int.h, inchash.h, real.h and
355 fixed-value.h due to flattening of tree.h.
356
2cc901dc
MP
3572015-01-07 Marek Polacek <polacek@redhat.com>
358
359 PR c/64417
360 * c-typeck.c (process_init_element): Disallow initialization of
361 a flexible array member with a string constant if the structure
362 is in an array.
363
5624e564
JJ
3642015-01-05 Jakub Jelinek <jakub@redhat.com>
365
e5341100
JJ
366 PR sanitizer/64344
367 * c-typeck.c (convert_for_assignment, c_finish_return): For
368 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
369 types also set in_late_binary_op around convert call.
370 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
371 to integral type casts, if not in_late_binary_op, pass c_fully_fold
372 result on expr as last argument to ubsan_instrument_float_cast,
373 if in_late_binary_op, don't use c_save_expr but save_expr.
374
5624e564
JJ
375 Update copyright years.
376
5bd012f8
MP
3772015-01-05 Marek Polacek <polacek@redhat.com>
378
379 PR c/64423
380 * c-typeck.c (build_array_ref): Pass loc down to
381 warn_array_subscript_with_type_char.
382
768952be
MU
3832014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
384
385 * c-typeck.c: New behavious for pointers to arrays with qualifiers
386 (common-pointer-type): For pointers to arrays take qualifiers from
387 element type.
388 (build_conditional_expr): Add warnings for lost qualifiers.
389 (comp-target-types): Allow pointers to arrays with different qualifiers.
390 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
391 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
392 to PEDWARN_FOR_QUALIFIERS.
393
8f94a8c4
JJ
3942014-12-17 Jakub Jelinek <jakub@redhat.com>
395
396 PR sanitizer/64289
397 * c-convert.c: Include ubsan.h.
398 (convert): For real -> integral casts and
399 -fsanitize=float-cast-overflow don't call convert_to_integer, but
400 instead instrument the float cast directly.
401
b731b390
JJ
4022014-11-29 Jakub Jelinek <jakub@redhat.com>
403
404 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
405 c_finish_stmt_expr): Remove NULL last argument from
406 create_tmp_var_raw and create_tmp_var calls.
407 * c-array-notation.c (fix_builtin_array_notation_fn,
408 build_array_notation_expr, fix_conditional_array_notations_1,
409 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
410
541e35a6
MP
4112014-11-28 Marek Polacek <polacek@redhat.com>
412
413 PR c/63862
414 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
415 convert the right operand to integer type.
416
b286be94
MP
4172014-11-25 Marek Polacek <polacek@redhat.com>
418
419 PR c/63877
420 * c-decl.c (start_function): Disable -Wmissing-declarations warning
421 for inline functions.
422
aa7da51a
JJ
4232014-11-21 Jakub Jelinek <jakub@redhat.com>
424
425 PR target/63764
426 * c-typeck.c (build_array_ref): Adjust
427 convert_vector_to_pointer_for_subscript caller. If it returns true,
428 call non_lvalue_loc on the result.
429
d876207f
RB
4302014-11-11 Richard Biener <rguenther@suse.de>
431
432 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
433 to true.
434
e5e44252
AK
4352014-11-10 Andi Kleen <ak@linux.intel.com>
436
437 PR c/60804
438 * c-parser.c (c_parser_statement_after_labels): Call
439 check_no_cilk.
440 (c_parser_if_statement): Dito.
441 (c_parser_switch_statement): Dito.
442 (c_parser_while_statement): Dito.
443 (c_parser_do_statement): Dito.
444 (c_parser_for_statement): Dito.
445 * c-typeck.c (c_finish_loop): Dito.
446
13c21655
PC
4472014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
448
449 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
450 OPT_Wshift_count_overflow in the warnings.
451
2d51fcef
MP
4522014-10-30 Marek Polacek <polacek@redhat.com>
453
454 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
455 print the stripped version as well, if they're not the same.
456
ef4bddc2
RS
4572014-10-29 Richard Sandiford <richard.sandiford@arm.com>
458
459 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
460 machine_mode.
461
c582198b
AM
4622014-10-28 Andrew MacLeod <amacleod@redhat.com>
463
464 * c-decl.c: Adjust include files.
465 * c-parser.c: Ditto.
466
ddc8de03
PM
4672014-10-27 Phil Muldoon <pmuldoon@redhat.com>
468 Tom Tromey <tromey@redhat.com>
469
470 * c-tree.h (enum c_oracle_request): New.
471 (c_binding_oracle_function): New typedef.
472 (c_binding_oracle, c_pushtag, c_bind): Declare.
473 * c-decl.c (c_binding_oracle): New global.
474 (I_SYMBOL_CHECKED): New macro.
475 (i_symbol_binding): New function.
476 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
477 (I_TAG_CHECKED): New macro.
478 (i_tag_binding): New function.
479 (I_TAG_BINDING, I_TAG_DECL): Redefine.
480 (I_LABEL_CHECKED): New macro.
481 (i_label_binding): New function.
482 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
483 (c_print_identifier): Save and restore c_binding_oracle.
484 (c_pushtag, c_bind): New functions.
485
60393bbc
AM
4862014-10-27 Andrew MacLeod <amacleod@redhat.com>
487
488 * c-typeck.c: Adjust include files.
489
d723bb7c
MLI
4902014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
491
492 PR c++/53061
493 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
494 initialization here...
495 (c_initialize_diagnostics): ... but here. Set defaults after
496 building pretty-printer.
497
1bc5a451
MP
4982014-10-23 Marek Polacek <polacek@redhat.com>
499
500 PR c/63626
501 * c-decl.c (pop_scope): Don't print warning in external_scope.
502
4435bb92
MP
5032014-10-19 Marek Polacek <polacek@redhat.com>
504
505 PR c/63567
506 * c-typeck.c (output_init_element): Allow initializing objects with
507 static storage duration with compound literals even in C99 and add
508 pedwarn for it.
509
7278465e
MP
5102014-10-17 Marek Polacek <polacek@redhat.com>
511
512 PR c/63567
513 * c-typeck.c (digest_init): Allow initializing objects with static
514 storage duration with compound literals even in C99 and add pedwarn
515 for it.
516
d9b7be2e
MP
5172014-10-17 Marek Polacek <polacek@redhat.com>
518
519 PR c/63543
520 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
521 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
522 error multiple times. Print the type.
523
f406ae1f
MP
5242014-10-17 Marek Polacek <polacek@redhat.com>
525
526 PR c/63549
527 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
528 type.
529
92574c7c
MP
5302014-10-17 Marek Polacek <polacek@redhat.com>
531
532 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
533 (start_function): Use OPT_Wimplicit_int instead of 0.
534 (store_parm_decls_oldstyle): Likewise.
535
1bc4a978
MT
5362014-10-17 Alan Modra <amodra@gmail.com>
537
538 PR middle-end/61848
539 * c-decl.c (merge_decls): Don't merge section name or tls model
540 to newdecl symtab node, instead merge to olddecl. Override
541 existing olddecl section name. Set tls_model for all thread-local
542 vars, not just OMP thread-private ones. Remove incorrect comment.
543
83685514
AM
5442014-10-16 Andrew MacLeod <amacleod@redhat.com>
545
546 * c-decl.c: Adjust include files.
547
78a7c317
DD
5482014-10-14 DJ Delorie <dj@redhat.com>
549
550 * c-parser.c (c_parse_init): Add RID entries for each __intN.
551 (c_token_starts_typename): Check all __intN, not just __int128.
552 (c_token_starts_declspecs): Likewise.
553 (c_parser_declspecs): Likewise.
554 (c_parser_attribute_any_word): Likewise.
555 (c_parser_objc_selector): Likewise.
556 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
557 (struct c_declspecs): Add int_n_idx field to record *which* __intN
558 is specified.
559 * c-decl.c (declspecs_add_type): Check for all __intN, not just
560 __int128.
561 (finish_declspecs): Likewise.
562
74d98c1e
AB
5632014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
564
565 * c-parser.c (c_parser_all_labels): New function to replace
566 the duplicate code.
567 (c_parser_statement): Call the new function.
568
84937de2
MP
5692014-10-09 Marek Polacek <polacek@redhat.com>
570
571 PR c/63480
572 * c-typeck.c (pop_init_level): Don't warn about initializing
573 with { }.
574
0382aaa0
MP
5752014-10-07 Marek Polacek <polacek@redhat.com>
576
577 PR c/59717
578 * c-decl.c (header_for_builtin_fn): New function.
579 (implicitly_declare): Suggest which header to include.
580
7a0ca710
MP
5812014-10-07 Marek Polacek <polacek@redhat.com>
582
583 * c-convert.c (convert): Use error_operand_p.
584 * c-typeck.c (require_complete_type): Likewise.
585 (really_atomic_lvalue): Likewise.
586 (digest_init): Likewise.
587 (handle_omp_array_sections_1): Likewise.
588
6bc8a126
MP
5892014-10-03 Marek Polacek <polacek@redhat.com>
590
591 PR c/63453
592 * c-decl.c (pop_scope): Don't warn about "inline function declared
593 but never defined" for functions marked with gnu_inline attribute.
594
d90c0a59
JJ
5952014-09-25 Jakub Jelinek <jakub@redhat.com>
596
597 PR c++/63249
598 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
599 on low_bound and length.
600
083e891e
MP
6012014-09-24 Marek Polacek <polacek@redhat.com>
602
603 PR c/61405
604 PR c/53874
605 * c-parser.c: Don't define CPP_KEYWORD.
606 (c_parser_switch_statement): Pass original type to c_finish_case.
607 * c-tree.h (c_finish_case): Update declaration.
608 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
609 conditionally to c_do_switch_warnings.
610
8d95fe25
MP
6112014-09-03 Marek Polacek <polacek@redhat.com>
612
613 PR c/62024
614 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
615 conversions.
616
9a771876
JJ
6172014-09-02 Jakub Jelinek <jakub@redhat.com>
618 Balaji V. Iyer <balaji.v.iyer@intel.com>
619 Igor Zamyatin <igor.zamyatin@intel.com>
620
621 * c-parser.c (c_parser_cilk_for): New function.
622 (c_parser_cilk_grainsize): Likewise.
623 (c_get_temp_regvar): Likewise.
624 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
625 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
626 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
627 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
628 case.
629
b7679d96
CG
6302014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
631
632 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
633 with using HOST_WIDE_INT without truncation to 'int'
634
59ea0364
MP
6352014-08-22 Marek Polacek <polacek@redhat.com>
636
637 PR c++/62199
638 * c-typeck.c (parser_build_binary_op): Adjust call to
639 warn_logical_not_parentheses.
640
671a475e
IZ
6412014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
642
643 PR other/62008
644 * c-parser.c (c_parser_array_notation): Check for correct
645 type of an array added.
646
04159acf
MP
6472014-08-19 Marek Polacek <polacek@redhat.com>
648
649 PR c++/62153
650 * c-typeck.c (build_binary_op): If either operand of a comparison
651 is a boolean expression, call maybe_warn_bool_compare.
652
c77935ee
PP
6532014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
654
655 PR c/45584
656 * c-typeck.c (build_c_cast): Do a conversion even when the
657 TYPE_MAIN_VARIANTs are the same.
658
35aff4fb
MP
6592014-08-19 Marek Polacek <polacek@redhat.com>
660
661 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
662 pedwarn_c99 instead of pedwarn.
663 (grokfield): Likewise.
664 (warn_defaults_to): New function.
665 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
666 Unconditionally call pedwarn_c99 instead of pedwarn.
667 (start_function): Call warn_defaults_to instead of pedwarn_c99.
668 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
669 check flag_isoc11 before.
670 * c-errors.c (pedwarn_c99): Change the return type to bool.
671 Handle -Wc99-c11-compat.
672 * c-parser.c (disable_extension_diagnostics): Handle
673 warn_c99_c11_compat.
674 (restore_extension_diagnostics): Likewise.
675 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
676 instead of pedwarn, don't check flag_isoc11 before.
677 (c_parser_declspecs): Likewise.
678 (c_parser_alignas_specifier): Likewise.
679 (c_parser_alignof_expression): Likewise.
680 (c_parser_generic_selection): Likewise.
681 * c-tree.h (pedwarn_c99): Update declaration.
682 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
683 of pedwarn_c99.
684
177cce46
MP
6852014-08-19 Marek Polacek <polacek@redhat.com>
686
687 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
688 to pedwarn_c90.
689 * c-errors.c: Include "opts.h".
690 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
691 * c-parser.c (disable_extension_diagnostics): Handle negative value
692 of warn_c90_c99_compat, too.
693 (restore_extension_diagnostics): Likewise.
694 (c_parser_compound_statement_nostart): Pass
695 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
696
6dc99c33
MP
6972014-08-12 Marek Polacek <polacek@redhat.com>
698
699 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
700 Add pedwarn.
701 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
702 Likewise.
703 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
704
f3bede71
MP
7052014-08-10 Marek Polacek <polacek@redhat.com>
706
707 PR c/51849
708 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
709 Call pedwarn_c90 instead of pedwarn.
710 (check_bitfield_type_and_width): Likewise.
711 (declspecs_add_qual): Likewise.
712 (declspecs_add_type): Likewise.
713 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
714 Adjust to only call pedwarn_c90.
715 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
716 pedwarn_c90 instead of pedwarn.
717 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
718 * c-parser.c (disable_extension_diagnostics): Handle
719 warn_c90_c99_compat.
720 (restore_extension_diagnostics): Likewise.
721 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
722 pedwarn_c90 instead of pedwarn.
723 (c_parser_initelt): Likewise.
724 (c_parser_postfix_expression): Likewise.
725 (c_parser_postfix_expression_after_paren_type): Likewise.
726 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
727 * c-tree.h: Fix formatting.
728 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
729 pedwarn_c90 instead of pedwarn.
730
9f25a338
TS
7312014-08-07 Trevor Saunders <tsaunders@mozilla.com>
732
733 * c-typeck.c: Remove include of pointer-set.h.
734
044331a8
MP
7352014-08-07 Marek Polacek <polacek@redhat.com>
736
737 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
738
b787e7a2
TS
7392014-08-02 Trevor Saunders <tsaunders@mozilla.com>
740
741 * c-typeck.c: Use hash_map instead of pointer_map.
742
6e2830c3
TS
7432014-08-02 Trevor Saunders <tsaunders@mozilla.com>
744
745 * c-decl.c: Use hash_set instead of pointer_set.
746
a7ee52fb
IZ
7472014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
748
749 PR middle-end/61455
750 * c-array-notation.c (expand_array_notations): Handling
751 of DECL_EXPR added.
752
b4dfdc11
MG
7532014-07-31 Marc Glisse <marc.glisse@inria.fr>
754
755 PR c++/60517
756 * c-typeck.c (c_finish_return): Return 0 instead of the address of
757 a local variable.
758
976d5a22
TT
7592014-07-30 Tom Tromey <tromey@redhat.com>
760
761 * c-typeck.c (struct constructor_stack) <designator_depth>: New
762 field.
763 (really_start_incremental_init, push_init_level): Initialize
764 designator_depth.
765 (pop_init_level): Set global designator_depth.
766 (process_init_element): Check for designated_init attribute.
767
30281de2
MP
7682014-07-20 Marek Polacek <polacek@redhat.com>
769
770 PR c/61852
771 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
772 (implicitly_declare): Pass location to implicit_decl_warning.
773
b108f48f
JJ
7742014-07-14 Jakub Jelinek <jakub@redhat.com>
775
776 PR middle-end/61294
777 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
778 If non-NULL, call c_parser_check_literal_zero.
779 (c_parser_check_literal_zero): New function.
780 (c_parser_postfix_expression_after_primary): Adjust
781 c_parser_expr_list caller, handle -Wmemset-transposed-args.
782
773ec47f
MP
7832014-07-06 Marek Polacek <polacek@redhat.com>
784
785 PR c/6940
786 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
787 * c-tree.h (C_ARRAY_PARAMETER): Define.
788 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
789 function parameter.
790
22e1cf1c
JH
7912014-07-02 Jan Hubicka <hubicka@ucw.cz>
792 Chen Gang <gang.chen.5i5j@gmail.com>
793
794 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
795 releasing symbol.
796
52ec0ea3
MP
7972014-07-01 Marek Polacek <polacek@redhat.com>
798
799 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
800 instead of 0 to WARN_FOR_ASSIGNMENT.
801
d5c3d343
MP
8022014-07-01 Marek Polacek <polacek@redhat.com>
803
804 PR c/58286
805 * c-typeck.c (convert_for_assignment): Pass
806 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
807
6a7253a4
MP
8082014-06-30 Marek Polacek <polacek@redhat.com>
809
810 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
811 has no_sanitize_undefined attribute.
812
5e88a8f4
IZ
8132014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
814
815 PR middle-end/57541
816 * c-array-notation.c (fix_builtin_array_notation_fn):
817 Check for 0 arguments in builtin call. Check that bultin argument is
818 correct.
819 * c-parser.c (c_parser_array_notation): Check for incorrect initial
820 index.
821
9698b078
SH
8222014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
823
824 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
825 qualifiers in __auto_type for atomic types.
826 (c_parser_typeof_specifier): Discard all type qualifiers in
827 __typeof__ for atomic types.
828
6e07c515
MP
8292014-06-25 Marek Polacek <polacek@redhat.com>
830
831 PR c/61162
832 * c-parser.c (c_parser_statement_after_labels): Pass the location of
833 the return expression to c_finish_return.
834
da6f124d
JJ
8352014-06-25 Jakub Jelinek <jakub@redhat.com>
836
837 * c-typeck.c (c_finish_omp_clauses): Make sure
838 OMP_CLAUSE_LINEAR_STEP has correct type.
839
c203e8a7
TS
8402014-06-24 Trevor Saunders <tsaunders@mozilla.com>
841
842 * c-decl.c: Adjust.
843
56ad0e38
JJ
8442014-06-24 Jakub Jelinek <jakub@redhat.com>
845
846 * c-parser.c (c_parser_omp_for_loop): For
847 #pragma omp parallel for simd move lastprivate clause from parallel
848 to for rather than simd.
849
47c2554f
MP
8502014-06-23 Marek Polacek <polacek@redhat.com>
851
852 * c-typeck.c (parser_build_binary_op): Don't call
853 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
854
56363ffd
JH
8552014-06-15 Jan Hubicka <hubicka@ucw.cz>
856
857 * c-parser.c (c_parser_omp_threadprivate): Likewise.
858 * c-decl.c (merge_decls): Likewise.
859
d7ff7ae5
MP
8602014-06-09 Marek Polacek <polacek@redhat.com>
861
862 PR c/36446
863 * c-typeck.c (error_init): Call inform instead of error_at.
864 (pedwarn_init): Call inform instead of pedwarn.
865 (warning_init): Call inform instead of warning_at.
866
24d047a3
JH
8672014-06-07 Jan Hubicka <hubicka@ucw.cz>
868
869 * c-decl.c (merge_decls): Use set_decl_section_name.
870 (duplicate_decls): Remove node if it exists.
871
9bac5cbb
G
8722014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
873
874 PR c/53119
875 * c-typeck.c (push_init_level, process_init_element,
876 pop_init_level): Correct check for zero initialization, move
877 missing brace warning to respect zero initialization.
878
8ffcdea8
MP
8792014-06-05 Marek Polacek <polacek@redhat.com>
880
881 PR c/56724
882 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
883
742938c9
MP
8842014-06-05 Marek Polacek <polacek@redhat.com>
885
886 PR c/49706
887 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
888 on the left hand side operand of a comparison.
889
6447c55d
MP
8902014-06-05 Marek Polacek <polacek@redhat.com>
891
892 PR c/48062
893 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
894 Print note only if the warning was printed.
895
9dc7743c
IZ
8962014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
897
898 PR c/58942
899 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
900 with a pointer.
901
fedfecef
MP
9022014-06-03 Marek Polacek <polacek@redhat.com>
903
904 PR c/60439
905 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
906 c_start_case.
907 * c-tree.h (c_start_case): Update.
908 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
909 switch condition has boolean value.
910
9b2b7279
AM
9112014-06-02 Andrew MacLeod <amacleod@redhat.com>
912
913 * c-decl.c: Include builtins.h.
914 * c-parser.c: Likewise.
915
5c1bc275
MP
9162014-05-27 Marek Polacek <polacek@redhat.com>
917
918 PR c/56724
919 * c-typeck.c (convert_arguments): Get location of a parameter. Change
920 error and warning calls to error_at and warning_at. Pass location of
921 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
922 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
923 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
924
97563bc8
IZ
9252014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
926
927 PR c/61191
928 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
929 function parameters.
930
aede2c10
JH
9312014-05-23 Jan Hubicka <hubicka@ucw.cz>
932
933 * c-decl.c (merge_decls): Preserve symtab node pointers.
934 (duplicate_decls): Free new decl.
935
edbba2ce
TS
9362014-05-23 Thomas Schwinge <thomas@codesourcery.com>
937
f3316c6d
TS
938 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
939 initialization.
940
edbba2ce
TS
941 * c-parser.c (c_parser_omp_target): Return bool values.
942
68c81f24
TS
9432014-05-22 Thomas Schwinge <thomas@codesourcery.com>
944
945 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
946 num_teams_loc variable to num_thread_limit_loc.
947
632f2871
RS
9482014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
949
950 * c-array-notation.c (expand_array_notations): Use void_node
951 instead of void_zero_node.
952
766090c2
TS
9532014-05-17 Trevor Saunders <tsaunders@mozilla.com>
954
955 * c-decl.c (finish_struct): Adjust.
956 (finish_enum): Likewise.
957 (bind): Adjust.
958 (record_inline_static): Likewise.
959 (push_scope): Likewise.
960 (make_label): Likewise.
961 (lookup_label_for_goto): Likewise.
962 (finish_struct): Likewise.
963 (finish_enum): Likewise.
964 (store_parm_decls): Likewise.
965 (c_push_function_context): Likewise.
966 * c-lang.h: Remove usage of variable_size gty attribute.
967 * c-parser.c (c_parse_init): Adjust.
968 (c_parse_file): Likewise.
969
2b107f6b
MP
9702014-05-13 Marek Polacek <polacek@redhat.com>
971
972 PR c/61162
973 * c-typeck.c (convert_for_assignment): Pass location to
974 WARN_FOR_ASSIGNMENT instead of input_location.
975
d033409e
MP
9762014-05-10 Marek Polacek <polacek@redhat.com>
977
978 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
979 maybe_warn_string_init.
980 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
981 maybe_warn_string_init.
982 * c-tree.h (maybe_warn_string_init): Update declaration.
983 * c-typeck.c (maybe_warn_string_init): Add location parameter.
984 Call pedwarn_init with loc instead of with input_location.
985 (digest_init): Pass init_loc to maybe_warn_string_init.
986 (pop_init_level): Call pedwarn_init with loc instead of with
987 input_location.
988 (set_init_index): Likewise.
989 (process_init_element): Likewise.
990
ea58ef42
MP
9912014-05-09 Marek Polacek <polacek@redhat.com>
992
993 PR c/61096
994 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
995 (c_parser_initelt): Pass location to set_init_label. Pass array index
996 location to set_init_index.
997 * c-tree.h (push_init_level): Update declaration.
998 (pop_init_level): Likewise.
999 (set_init_index): Likewise.
1000 (set_init_label): Likewise.
1001 * c-typeck.c (error_init): Add location parameter. Call error_at
1002 instead of error.
1003 (digest_init): Pass init_loc to error_init.
1004 (really_start_incremental_init):
1005 (push_init_level): Add location parameter. Pass loc to pop_init_level
1006 and error_init.
1007 (pop_init_level): Likewise.
1008 (set_designator): Add location parameter. Pass loc to pop_init_level,
1009 push_init_level, and error_init.
1010 (set_init_index): Add location parameter. Pass loc to error_init and
1011 set_designator.
1012 (set_init_label): Likewise.
1013 (output_init_element): Pass loc to error_init.
1014 (process_init_element): Pass loc to error_init, pop_init_level,
1015 pedwarn_init, and push_init_level.
1016
661a0813
MP
10172014-05-09 Marek Polacek <polacek@redhat.com>
1018
1019 PR c/50459
1020 * c-parser.c (c_parser_attributes): Parse the arguments as an
1021 expression-list if the attribute takes identifier.
1022
2793eeab
MP
10232014-05-08 Marek Polacek <polacek@redhat.com>
1024
1025 PR c/61053
1026 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
1027 TYPE_ALIGN_UNIT.
1028
f827930a
MP
10292014-05-08 Marek Polacek <polacek@redhat.com>
1030
1031 PR c/61077
1032 * c-decl.c (start_function): Warn for _Atomic-qualified return type
1033 of main.
1034
1d60af08
KZ
10352014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
1036 Mike Stump <mikestump@comcast.net>
1037 Richard Sandiford <rdsandiford@googlemail.com>
1038
1039 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
1040 (finish_enum): Use wide-int interfaces.
1041 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
1042 * c-typeck.c (build_c_cast): Likewise.
1043 (set_nonincremental_init_from_string): Likewise.
1044 (c_tree_equal): Likewise.
1045
a0e24419
MP
10462014-05-02 Marek Polacek <polacek@redhat.com>
1047
1048 PR c/25801
1049 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
1050 Return size_one_node when the type is not complete.
1051 (pointer_diff): Remove comment.
1052 (build_unary_op): Improve error messages.
1053
19fc9faa
MP
10542014-05-02 Marek Polacek <polacek@redhat.com>
1055
1056 * c-typeck.c (c_finish_return): Separate warning_at calls.
1057
63bc4e87
MP
10582014-05-02 Marek Polacek <polacek@redhat.com>
1059
1060 * c-tree.h (error_init): Remove declaration.
1061 (pedwarn_init): Likewise.
1062 * c-typeck.c (error_init): Make static and move above.
1063 (pedwarn_init): Likewise.
1064 (warning_init): Move above.
1065 (maybe_warn_string_init): Likewise.
1066
4bd2511b
JL
10672014-05-01 Jeff Law <law@redhat.com>
1068
1069 Revert:
1070
1071 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1072 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
1073 avoid goto.
1074
6a358dcb
MP
10752014-05-02 Marek Polacek <polacek@redhat.com>
1076
1077 PR c/60784
1078 * c-typeck.c (push_init_level): Set constructor_designated to
1079 p->designated for structures.
1080
ae5ebda4
MP
10812014-05-01 Marek Polacek <polacek@redhat.com>
1082
1083 PR c/60915
1084 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
1085 function-definition has an attribute after the declarator.
1086
96b40f8d
MP
10872014-05-01 Marek Polacek <polacek@redhat.com>
1088
1089 PR c/60257
1090 * c-typeck.c (warning_init): Add location_t parameter. Call
1091 warning_at instead of warning.
1092 (push_init_level): Pass input_location to warning_init.
1093 (add_pending_init): Add location_t parameter. Pass loc to
1094 warning_init.
1095 (set_nonincremental_init): Pass input_location to add_pending_init.
1096 (set_nonincremental_init_from_string): Likewise.
1097 (output_init_element): Pass loc to warning_init and to
1098 add_pending_init.
1099
32e00768
MP
11002014-05-01 Marek Polacek <polacek@redhat.com>
1101
1102 PR c/43395
1103 * c-typeck.c (c_finish_return): Distinguish between label and variable
1104 when warning about returning local address.
1105
c9379ce2
MP
11062014-05-01 Marek Polacek <polacek@redhat.com>
1107
1108 PR c/29467
1109 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
1110 in C89 mode.
1111
d00887e8
MP
11122014-05-01 Marek Polacek <polacek@redhat.com>
1113
1114 PR c/43245
1115 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
1116 instead of 0 to WARN_FOR_QUALIFIERS.
1117
5436fa2e
MP
11182014-05-01 Marek Polacek <polacek@redhat.com>
1119
1120 PR c/56989
1121 * c-typeck.c (default_conversion): Use better location for
1122 error call.
1123
f8ed5150
MP
11242014-04-30 Marek Polacek <polacek@redhat.com>
1125
1126 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
1127 also when SANITIZE_FLOAT_DIVIDE is on.
1128
8337d1db
MP
11292014-04-30 Marek Polacek <polacek@redhat.com>
1130
1131 PR c/60139
1132 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
1133 and pedwarn_init. Use loc insted of input_location.
1134
c4bdc42f
MP
11352014-04-30 Marek Polacek <polacek@redhat.com>
1136
1137 PR c/60351
1138 * c-typeck.c (build_binary_op): Use location when warning about
1139 shift count.
1140
45484dcf
MP
11412014-04-25 Marek Polacek <polacek@redhat.com>
1142
1143 PR c/18079
1144 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
1145 always_inline/noinline and hot/cold attributes.
1146
34cf811f
MP
11472014-04-25 Marek Polacek <polacek@redhat.com>
1148
1149 PR c/60114
1150 * c-parser.c (c_parser_initelt): Pass input_location to
1151 process_init_element.
1152 (c_parser_initval): Pass loc to process_init_element.
1153 * c-tree.h (process_init_element): Adjust declaration.
1154 * c-typeck.c (push_init_level): Pass input_location to
1155 process_init_element.
1156 (pop_init_level): Likewise.
1157 (set_designator): Likewise.
1158 (output_init_element): Add location_t parameter. Pass loc to
1159 digest_init.
1160 (output_pending_init_elements): Pass input_location to
1161 output_init_element.
1162 (process_init_element): Add location_t parameter. Pass loc to
1163 output_init_element.
1164
42056eac
JJ
11652014-04-24 Jakub Jelinek <jakub@redhat.com>
1166
1167 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
1168 atomic-clause, allow comma in between atomic-clause and
1169 seq_cst.
1170
e162a134
JJ
11712014-04-22 Jakub Jelinek <jakub@redhat.com>
1172
1173 PR c/59073
1174 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
1175 fails, don't set OM_PARALLEL_COMBINED and return NULL.
1176
2f6babac
IZ
11772014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
1178
1179 PR middle-end/60469
1180 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1181 create_tmp_var instead build_decl for creating temps.
1182 (build_array_notation_expr): Likewise.
1183 (fix_conditional_array_notations_1): Likewise.
1184 (fix_array_notation_expr): Likewise.
1185 (fix_array_notation_call_expr): Likewise.
1186
8edbfaa6
JJ
11872014-03-28 Jakub Jelinek <jakub@redhat.com>
1188
1189 PR c++/60689
1190 * c-tree.h (c_build_function_call_vec): New prototype.
1191 * c-typeck.c (build_function_call_vec): Don't call
1192 resolve_overloaded_builtin here.
1193 (c_build_function_call_vec): New wrapper function around
1194 build_function_call_vec. Call resolve_overloaded_builtin here.
1195 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
1196 Call c_build_function_call_vec instead of build_function_call_vec.
1197 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1198 * c-decl.c (finish_decl): Likewise.
1199
7485aeea
MLI
12002014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1201
1202 PR c/55383
1203 * c-typeck.c: Use correct format string in cast-qual warning
1204
b17a8b07
TS
12052014-03-07 Thomas Schwinge <thomas@codesourcery.com>
1206
1207 * c-decl.c (c_decl_attributes): Use
1208 lang_hooks.types.omp_mappable_type.
1209 * c-typeck.c (c_finish_omp_clauses): Likewise.
1210
3af9c5e9
MP
12112014-03-06 Marek Polacek <polacek@redhat.com>
1212
1213 PR c/60197
1214 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
1215 of checking tree code.
1216
1c9f5f33
PK
12172014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1218
1219 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
1220 (c_parser_parameter_declaration): Likewise.
1221
cc28fc7f
MP
12222014-02-19 Marek Polacek <polacek@redhat.com>
1223
1224 PR c/60195
1225 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
1226 Call mark_exp_read on exp.value.
1227 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
1228 TREE_ADDRESSABLE on old instead of val.
1229 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
1230
b581c05c
PK
12312014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1232
1233 * c-parser.c (c_parser_get_builtin_args): Replace calls to
1234 C_EXPR_APPEND by vec_safe_push.
1235 * c-tree.h (C_EXPR_APPEND): Remove.
1236
81e5eca8
MP
12372014-01-31 Marek Polacek <polacek@redhat.com>
1238
1239 PR c/59963
1240 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
1241 build_function_call_vec.
1242 (build_function_call): Likewise.
1243 (build_atomic_assign): Likewise.
1244 (build_function_call_vec): Add arg_loc parameter. Use it.
1245 (convert_arguments): Likewise.
1246 (convert_for_assignment): Rename rhs_loc to expr_loc.
1247 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
1248 (c_parser_objc_keywordexpr): Likewise.
1249 (c_parser_postfix_expression_after_primary): Call
1250 build_function_call_vec with expr_loc rather than op_loc.
1251 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
1252 build_function_call_vec.
1253 (c_parser_expr_list): Add locations parameter. Fill it with locations
1254 of function arguments.
1255 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
1256
68fca595
MP
12572014-01-30 Marek Polacek <polacek@redhat.com>
1258
1259 PR c/59940
1260 * c-typeck.c (build_function_call_vec): Use loc parameter.
1261 (convert_arguments): Add location parameter. Use it.
1262 (ep_convert_and_check): Likewise.
1263 (build_atomic_assign): Adjust convert_for_assignment call.
1264 (build_modify_expr): Likewise.
1265 (digest_init): Likewise.
1266 (c_finish_return): Likewise.
1267 (build_conditional_expr): Adjust ep_convert_and_check calls.
1268 (convert_for_assignment): Add rhs_loc parameter. Use it.
1269 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
1270 calls.
1271
fa337f3a
RB
12722014-01-30 Richard Biener <rguenther@suse.de>
1273
1274 PR c/59905
1275 * c-typeck.c (build_function_call_vec): Do not replace calls
1276 to a function via an incompatible type with a runtime abort.
1277
b72271b9
BI
12782014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
1279
1280 * c-parser.c (c_parser_declaration_or_fndef): Replaced
1281 flag_enable_cilkplus with flag_cilkplus.
1282 (c_parser_direct_declarator_inner): Likewise.
1283 (c_parser_attribute_any_word): Likewise.
1284 (c_parser_attributes): Likewise.
1285 (c_parser_compound_statement): Likewise.
1286 (c_parser_statement_after_labels): Likewise.
1287 (c_parser_if_statement): Likewise.
1288 (c_parser_switch_statement): Likewise.
1289 (c_parser_do_statement): Likewise.
1290 (c_parser_for_statement): Likewise.
1291 (c_parser_unary_expression): Likewise.
1292 (c_parser_postfix_expression): Likewise.
1293 (c_parser_postfix_expression_after_primary): Likewise.
1294 (c_parser_postfix_expression_after_primary): Likewise.
1295 (c_parser_omp_clause_name): Likewise.
1296 (c_finish_omp_declare_simd): Likewise.
1297 (c_parser_cilk_verify_simd): Likewise.
1298 * c-typeck.c (build_array_ref): Likewise.
1299 (build_function_call_vec): Likewise.
1300 (convert_arguments): Likewise.
1301 (build_compound_expr): Likewise.
1302 (c_finish_return): Likewise.
1303 (c_finish_if_stmt): Likewise.
1304 (c_finish_loop): Likewise.
1305 (build_binary_op): Likewise.
1306
393e8e8b
MP
13072014-01-23 Marek Polacek <polacek@redhat.com>
1308
1309 PR c/59846
1310 * c-typeck.c (parser_build_binary_op): Use location instead of
1311 input_location.
1312 (build_binary_op): Pass location to shorten_compare.
1313
f04dda30
MP
13142014-01-23 Marek Polacek <polacek@redhat.com>
1315
1316 PR c/58346
1317 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
1318 an empty aggregate.
1319
789eadcd
MP
13202014-01-23 Marek Polacek <polacek@redhat.com>
1321
1322 PR c/59871
1323 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
1324 of a comma expression.
1325 (emit_side_effect_warnings): Likewise.
1326
40f14e9f
BI
13272014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1328
1329 PR c/59825
1330 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
1331 function to use walk_tree and moved a lot of its functionality to
1332 expand_array_notations.
1333 (expand_array_notations): New function.
1334
74558dd9
BI
13352014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1336
1337 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
1338 attribute an attribute without value.
1339
652fea39
JJ
13402014-01-23 Jakub Jelinek <jakub@redhat.com>
1341
1342 PR middle-end/58809
1343 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
1344 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
1345
f34f1c87
MP
13462014-01-22 Marek Polacek <polacek@redhat.com>
1347
1348 PR c/59891
1349 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
1350 of remove_c_maybe_const_expr on op1 and op2.
1351
241f845a
JJ
13522014-01-15 Jakub Jelinek <jakub@redhat.com>
1353
1354 PR c/58943
1355 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
1356 effects, preevaluate rhs using SAVE_EXPR first.
1357
9a74f20c
BI
13582014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
1359
1360 PR c++/59631
1361 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
1362 statements with if-elseif statements.
1363
96066ce1
MP
13642014-01-06 Marek Polacek <polacek@redhat.com>
1365
1366 PR c/57773
1367 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
1368 defined bit-field types only in ISO C.
1369
23a5b65a
RS
13702014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1371
1372 Update copyright years
1373
f9030485
RS
13742014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1375
1376 * c-array-notation.c: Use the standard form for the copyright notice.
1377
41958c28
BI
13782013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
1379
1380 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
1381 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
1382 field in parser is not empty. If not-empty, call the function
1383 c_parser_finish_omp_declare_simd.
1384 (c_parser_cilk_clause_vectorlength): Modified function to be shared
1385 between SIMD-enabled functions and #pragma simd. Added new parameter.
1386 (c_parser_cilk_all_clauses): Modified the usage of the function
1387 c_parser_cilk_clause_vectorlength as mentioned above.
1388 (c_parser_cilk_simd_fn_vector_attrs): New function.
1389 (c_finish_cilk_simd_fn_tokens): Likewise.
1390 (is_cilkplus_vector_p): Likewise.
1391 (c_parser_omp_clause_name): Added checking for "vectorlength,"
1392 "nomask," and "mask" strings in clause name.
1393 (c_parser_omp_all_clauses): Added 3 new case statements:
1394 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
1395 PRAGMA_CILK_CLAUSE_NOMASK.
1396 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
1397 check for vector attribute and if so call the function
1398 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
1399 called the function c_finish_cilk_simd_fn_tokens.
1400 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
1401 parser field is non-empty. If so, parse them as you would parse
1402 the omp declare simd pragma.
1403 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
1404 Added a check when step is a parameter and flag it as error.
1405 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
1406 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
1407 pragma_omp_clause.
1408
cef0fd0e
TS
14092013-12-17 Thomas Schwinge <thomas@codesourcery.com>
1410
1411 * c-parser.c (c_parser_omp_parallel): Fix description.
1412
12893402
BI
14132013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
1414
1415 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
1416 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1417 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
1418 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
1419
296674db
JM
14202013-12-04 Joseph Myers <joseph@codesourcery.com>
1421
1422 PR c/52023
1423 * c-parser.c (c_parser_alignas_specifier): Use
1424 c_sizeof_or_alignof_type instead of c_alignof.
1425 (c_parser_alignof_expression): Likewise, with min_alignof
1426 parameter depending on alignof spelling used.
1427
edd28054
MP
14282013-12-04 Marek Polacek <polacek@redhat.com>
1429
1430 PR c/54113
1431 * c-decl.c (start_function): Don't warn for missing prototype for
1432 inline functions.
1433
da0fc454
MP
14342013-12-03 Marek Polacek <polacek@redhat.com>
1435
1436 PR c/59351
1437 * c-decl.c (build_compound_literal): Allow compound literals with
1438 empty initial value.
1439
4c2ecab0
JM
14402013-12-02 Joseph Myers <joseph@codesourcery.com>
1441
1442 PR c/58235
1443 * c-typeck.c (build_modify_expr): Diagnose assignment to
1444 expression with array type.
1445
340baef7
JM
14462013-11-29 Joseph Myers <joseph@codesourcery.com>
1447
1448 PR c/42262
1449 * c-typeck.c (process_init_element): Do not treat a string as
1450 initializing a whole array when used with a designator for an
1451 individual element.
1452
6763b9f7
JM
14532013-11-29 Joseph Myers <joseph@codesourcery.com>
1454
1455 PR c/57574
1456 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
1457 an inline function following a static declaration.
1458
e7bd1de1
JJ
14592013-11-28 Jakub Jelinek <jakub@redhat.com>
1460
1461 PR c/59310
1462 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
1463 to p_name before calling c_parser_omp_teams instead of after.
1464 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
1465 argument. Remove unused p_name variable.
1466
0136f8f0
AH
14672013-11-27 Aldy Hernandez <aldyh@redhat.com>
1468 Jakub Jelinek <jakub@redhat.com>
1469
1470 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
1471 external_scope is NULL.
1472
241b71bb
TV
14732013-11-27 Tom de Vries <tom@codesourcery.com>
1474 Marc Glisse <marc.glisse@inria.fr>
1475
1476 PR c++/59032
1477 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
1478
2fb9a547
AM
14792013-11-22 Andrew MacLeod <amacleod@redhat.com>
1480
1481 * c-typeck.c: Add required include files from gimple.h.
1482
8400e75e
DM
14832013-11-22 David Malcolm <dmalcolm@redhat.com>
1484
1485 * c-decl.c (define_label, shadow_tag_warned)
1486 (check_bitfield_type_and_width, grokdeclarator, grokparms,
1487 store_parm_decls_newstyle, store_parm_decls_oldstyle)
1488 (declspecs_add_type): Remove use of in_system_header macro.
1489 * c-parser.c (c_parser_unary_expression): Likewise.
1490 * c-typeck.c (store_init_value, process_init_element)
1491 (c_start_case): Likewise.
1492
1493 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
1494 macro.
1495
1496 * c-parser.c (c_parser_set_source_position_from_token): Remove
1497 reference to in_system_header from comment.
1498
386b1f1f
RS
14992013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1500
1501 * c-decl.c (grokdeclarator): Update comment to refer to
1502 tree_to_[su]hwi rather than tree_low_cst.
1503
ae7e9ddd
RS
15042013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1505
1506 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
1507 tree_to_uhwi throughout.
1508
9439e9a1
RS
15092013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1510
1511 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
1512 throughout.
1513
9541ffee
RS
15142013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1515
1516 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
1517 throughout.
1518
c02065fc
AH
15192013-11-15 Aldy Hernandez <aldyh@redhat.com>
1520
1521 * c-parser.c (c_parser_cilk_simd): New.
1522 (c_parser_cilk_verify_simd): New.
1523 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
1524 (c_parser_omp_for_loop): Add case for NE_EXPR.
1525 Set c_break_label for CILK_SIMD.
1526 (c_parser_cilk_clause_vectorlength): New.
1527 (c_parser_cilk_clause_linear): New.
1528 (c_parser_cilk_clause_name): New.
1529 (c_parser_cilk_all_clauses): New.
1530 * c-typeck.c (build_unary_op): Pass location argument to
1531 readonly_error.
1532 (build_modify_expr): Same.
1533 (build_asm_expr): Same.
1534 (c_finish_bc_stmt): Error on break/continue in loops.
1535
18f429e2
AM
15362013-11-14 Andrew MacLeod <amacleod@redhat.com>
1537
1538 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
1539
d8a2d370
DN
15402013-11-14 Diego Novillo <dnovillo@google.com>
1541
1542 * c-decl.c: Include print-tree.h.
1543 Include stor-layout.h.
1544 Include varasm.h.
1545 Include attribs.h.
1546 Include stringpool.h.
1547 * c-lang.c: Include fold-const.h.
1548 * c-parser.c: Include stringpool.h.
1549 Include attribs.h.
1550 Include stor-layout.h.
1551 Include varasm.h.
1552 Include trans-mem.h.
1553 * c-typeck.c: Include stor-layout.h.
1554 Include trans-mem.h.
1555 Include varasm.h.
1556 Include stmt.h.
1557
38b7bc7f
JM
15582013-11-13 Joseph Myers <joseph@codesourcery.com>
1559
1560 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
1561 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
1562 __auto_type.
1563 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
1564 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
1565 RID_AUTO_TYPE.
1566 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
1567 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
1568 (c_parser_declarator, c_parser_direct_declarator_inner)
1569 (c_parser_parameter_declaration, c_parser_type_name): All callers
1570 changed.
1571 (c_parser_declaration_or_fndef): Handle declarations with type
1572 determined from the initializer.
1573
45b0be94
AM
15742013-11-12 Andrew MacLeod <amacleod@redhat.com>
1575
18f429e2 1576 * c-typeck.c: Include gimplify.h.
45b0be94 1577
582d9b50
JM
15782013-11-12 Joseph Myers <joseph@codesourcery.com>
1579
1580 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
1581 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
1582 comment.
1583 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
1584 or _Thread_local as appropriate in diagnostics.
1585 (build_null_declspecs): Initialize ret->thread_gnu_p.
1586 (declspecs_add_scspec): Handle either __thread or _Thread_local
1587 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
1588 pedantic. Do not disallow _Thread_local extern and _Thread_local
1589 static.
1590
267bac10
JM
15912013-11-07 Joseph Myers <joseph@codesourcery.com>
1592 Andrew MacLeod <amacleod@redhat.com>
1593
1594 * c-aux-info.c (gen_type): Handle atomic qualifier.
1595 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
1596 qualifiers when compating types.
1597 (shadow_tag_warned): Handle atomic_p in declspecs.
1598 (quals_from_declspecs): Likewise.
1599 (start_decl): Use c_type_promotes_to when promoting argument
1600 types.
1601 (grokdeclarator): Handle _Atomic.
1602 (get_parm_info): Diagnose any qualifier on "void" as only
1603 parameter.
1604 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
1605 comparing types. Use c_type_promotes_to when promoting argument
1606 types.
1607 (finish_function): Use c_type_promotes_to when promoting argument
1608 types.
1609 (build_null_declspecs): Handle atomic_p in declspecs.
1610 (declspecs_add_qual): Handle RID_ATOMIC.
1611 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
1612 (c_token_starts_declspecs): Handle RID_ATOMIC.
1613 (c_parser_declspecs): Handle atomic type specifiers and
1614 qualifiers.
1615 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
1616 from types of expressions with atomic type.
1617 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
1618 (c_parser_attribute_any_word): Handle RID_ATOMIC.
1619 (c_parser_initializer, c_parser_initelt, c_parser_initval)
1620 (c_parser_statement_after_labels, c_parser_switch_statement)
1621 (c_parser_for_statement, c_parser_expr_no_commas)
1622 (c_parser_conditional_expression, c_parser_binary_expression)
1623 (c_parser_cast_expression, c_parser_unary_expression)
1624 (c_parser_postfix_expression)
1625 (c_parser_postfix_expression_after_primary, c_parser_expression):
1626 Use convert_lvalue_to_rvalue.
1627 (c_parser_expression_conv, c_parser_expr_list): Document
1628 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
1629 (c_parser_objc_synchronized_statement): Use
1630 convert_lvalue_to_rvalue.
1631 (c_parser_objc_selector): Handle RID_ATOMIC.
1632 (c_parser_objc_receiver, c_parser_array_notation): Use
1633 convert_lvalue_to_rvalue.
1634 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
1635 _Atomic (type-name).
1636 (struct c_declspecs): Add atomic_p field.
1637 (convert_lvalue_to_rvalue): Declare.
1638 * c-typeck.c (c_type_promotes_to): Promote atomic types to
1639 corresponding atomic types.
1640 (qualify_type): Don't add _Atomic qualifiers from second argument.
1641 (comp_target_types): Do not allow _Atomic mismatches.
1642 (type_lists_compatible_p): Do not remove atomic qualifiers when
1643 comparing types.
1644 (really_atomic_lvalue, convert_lvalue_to_rvalue)
1645 (build_atomic_assign): New functions.
1646 (build_unary_op): Use build_atomic_assign for atomic increment and
1647 decrement.
1648 (build_conditional_expr): Do not treat _Atomic void as a qualified
1649 version of void.
1650 (build_modify_expr): Use build_atomic_assign for atomic LHS.
1651 (find_anonymous_field_with_type, convert_to_anonymous_field)
1652 (convert_for_assignment): Do not remove atomic qualifiers when
1653 comparing types.
1654 (digest_init): Do not accept initialization of arrays of atomic
1655 elements by string constants.
1656 (build_asm_expr): Use convert_lvalue_to_rvalue.
1657 (build_binary_op): Do not treat _Atomic void as a qualified
1658 version of void.
1659
0c249d4b
DD
16602013-11-06 DJ Delorie <dj@redhat.com>
1661
1662 * c-decl.c (locate_old_decl): If a previous conflicting decl is
1663 both explicit and builtin, print the location of the explicit one.
1664
6d7f7e0a
TB
16652013-11-05 Tobias Burnus <burnus@net-b.de>
1666
1667 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
1668 c_parser_omp_distribute, c_parser_omp_teams,
1669 c_parser_omp_target, c_parser_omp_declare): Handle
1670 -fopenmp-simd.
1671
b906f4ca
MP
16722013-11-03 Marek Polacek <polacek@redhat.com>
1673
1674 * c-decl.c (grokdeclarator): Add VLA instrumentation.
1675
ee1d5a02
JJ
16762013-11-01 Jakub Jelinek <jakub@redhat.com>
1677
1678 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
1679 check_dup_generic at the end, unless remove is true.
1680 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
1681 remove = true;.
1682 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
1683
5a9785fb
JJ
16842013-10-31 Jakub Jelinek <jakub@redhat.com>
1685
1686 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
1687 with decl that is not pointer nor array.
1688
939b37da
BI
16892013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
1690
1691 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
1692 a spawning function is found.
1693 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
1694 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
1695 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1696 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
1697 case.
1698 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
1699 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
1700 expr.
1701 (c_finish_return): Added a check to reject _Cilk_spawn in return
1702 expression.
1703 (build_cilk_spawn): New function.
1704 (build_cilk_sync): Likewise.
1705 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
1706
d4af74d4
TB
17072013-10-27 Tobias Burnus <burnus@net-b.de>
1708
1709 PR other/33426
1710 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
1711 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
1712 (c_parser_statement_after_labels): Update calls.
1713
d73749df 17142013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
1715
1716 PR other/33426
1717 * c-parser.c (c_parser_pragma, c_parser_for_statement):
1718 Handle PRAGMA_IVDEP.
1719 (c_parser_statement_after_labels): Update call.
1720
f28aa681
MP
17212013-10-24 Marek Polacek <polacek@redhat.com>
1722
1723 * c-parser.c (c_parser_struct_declaration): Add a comment.
1724 (c_parser_declarator): Don't allow _Alignas here.
1725
0645c1a2
AM
17262013-10-17 Andrew MacLeod <amacleod@redhat.com>
1727
1728 * c-parser.c: Include omp-low.h.
1729 * c-typeck.c: Likewise.
1730
568a31f2
MP
17312013-10-17 Marek Polacek <polacek@redhat.com>
1732
1733 PR c/58267
1734 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
1735 Document syntax of the array-declarator.
1736 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
1737 are not permitted.
1738 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
1739 (c_parser_struct_declaration): Likewise.
1740 (c_parser_declarator): Likewise.
1741 (c_parser_direct_declarator_inner): Likewise.
1742 (c_parser_parameter_declaration): Likewise.
1743 (c_parser_type_name): Likewise.
1744
acf0174b
JJ
17452013-10-11 Jakub Jelinek <jakub@redhat.com>
1746
1747 * c-lang.h (current_omp_declare_target_attribute): New extern
1748 decl.
1749 * c-parser.c: Include c-lang.h.
1750 (struct c_parser): Change tokens to c_token *.
1751 Add tokens_buf field. Change tokens_avail type to unsigned int.
1752 (c_parser_consume_token): If parser->tokens isn't
1753 &parser->tokens_buf[0], increment parser->tokens.
1754 (c_parser_consume_pragma): Likewise.
1755 (enum pragma_context): Add pragma_struct and pragma_param.
1756 (c_parser_external_declaration): Adjust
1757 c_parser_declaration_or_fndef caller.
1758 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
1759 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
1760 Adjust recursive call.
1761 (c_parser_struct_or_union_specifier): Use pragma_struct instead
1762 of pragma_external.
1763 (c_parser_parameter_declaration): Use pragma_param instead of
1764 pragma_external.
1765 (c_parser_compound_statement_nostart, c_parser_label,
1766 c_parser_for_statement): Adjust
1767 c_parser_declaration_or_fndef callers.
1768 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
1769 it through to c_parser_conditional_expression.
1770 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
1771 pass it through to c_parser_binary_expression. Adjust recursive
1772 call.
1773 (c_parser_binary_expression): Remove prec argument, add
1774 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
1775 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
1776 binop matches it, use build2 instead of parser_build_binary_op.
1777 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
1778 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
1779 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
1780 Handle pragma_struct and pragma_param the same as pragma_external.
1781 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
1782 (c_parser_omp_variable_list): Parse array sections for
1783 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
1784 (c_parser_omp_clause_collapse): Fully fold collapse expression.
1785 (c_parser_omp_clause_reduction): Handle user defined reductions.
1786 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
1787 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
1788 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
1789 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
1790 c_parser_omp_clause_depend, c_parser_omp_clause_map,
1791 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
1792 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
1793 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
1794 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
1795 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
1796 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
1797 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
1798 (c_parser_omp_for_loop): Add CODE argument, pass it through
1799 to c_finish_omp_for. Change last argument to cclauses,
1800 and adjust uses to grab parallel clauses from the array of all
1801 the split clauses. Adjust c_parser_binary_expression,
1802 c_parser_declaration_or_fndef and c_finish_omp_for callers.
1803 (omp_split_clauses): New function.
1804 (c_parser_omp_simd): New function.
1805 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
1806 Allow the function to be called also when parsing combined constructs,
1807 and call c_parser_omp_simd when parsing for simd.
1808 (c_parser_omp_sections_scope): If section-sequence doesn't start with
1809 #pragma omp section, require exactly one structured-block instead of
1810 sequence of statements.
1811 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
1812 Allow the function to be called also when parsing combined constructs.
1813 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
1814 Allow the function to be called also when parsing combined
1815 constructs.
1816 (c_parser_omp_taskgroup, c_parser_omp_cancel,
1817 c_parser_omp_cancellation_point, c_parser_omp_distribute,
1818 c_parser_omp_teams, c_parser_omp_target_data,
1819 c_parser_omp_target_update, c_parser_omp_target,
1820 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
1821 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
1822 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
1823 (c_parser_omp_construct): Add p_name and mask vars. Handle
1824 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
1825 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
1826 and c_parser_omp_sections callers.
1827 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
1828 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
1829 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
1830 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
1831 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
1832 OMP_CLAUSE_DEPEND.
1833 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
1834 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
1835 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
1836 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
1837 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
1838 * c-typeck.c: Include tree-inline.h.
1839 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
1840 handle_omp_array_sections_1, handle_omp_array_sections,
1841 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
1842 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
1843 user defined reductions.
1844 (c_tree_equal): New function.
1845 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
1846 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
1847 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
1848 c_check_omp_declare_reduction_r): New prototypes.
1849 * c-decl.c (current_omp_declare_target_attribute): New variable.
1850 (c_decl_attributes): New function.
1851 (start_decl, start_function): Use it instead of decl_attributes.
1852 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
1853 c_omp_reduction_decl, c_omp_reduction_lookup,
1854 c_check_omp_declare_reduction_r): New functions.
1855
0a6c2227
TT
18562013-09-25 Tom Tromey <tromey@redhat.com>
1857
1858 * Make-lang.in (c/gccspec.o): Remove.
1859 (CFLAGS-c/gccspec.o): New variable.
1860 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
1861 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
1862 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
1863
f3bc55f0
TT
18642013-09-25 Tom Tromey <tromey@redhat.com>
1865
1866 * Make-lang.in (c/gccspec.o): Don't use subshell.
1867
a24d975c
MP
18682013-09-18 Marek Polacek <polacek@redhat.com>
1869
1870 PR sanitize/58443
1871 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
1872 Remove unnecessary check.
1873
ce6923c5
MP
18742013-09-18 Marek Polacek <polacek@redhat.com>
1875
1876 PR sanitizer/58411
1877 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
1878 no_sanitize_undefined attribute.
1879
a1e51df9
KT
18802013-09-13 Kai Tietz <ktietz@redhat.com>
1881
1882 PR target/57848
1883 * c-decl.c (c_builtin_function_ext_scope): Remove
1884 wrong assumption that it is never called on prexisting
1885 symbol.
1886
0af94e6f
JR
18872013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
1888
1889 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
1890
20059c8b
GDR
18912013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1892
1893 * c-objc-common.c (c_tree_printer): Tidy.
1894
de5a5fa1
MP
18952013-08-30 Marek Polacek <polacek@redhat.com>
1896
1897 * c-typeck.c (build_binary_op): Add division by zero and shift
1898 instrumentation.
1899
2531a1d9 19002013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 1901 Joseph Myers <joseph@codesourcery.com>
2531a1d9 1902
6e2bcc98 1903 PR c/35649
2531a1d9
JR
1904 * c-typeck.c (c_common_type): Prefer double_type_node over
1905 other REAL_TYPE types with the same precision.
1906 (convert_arguments): Likewise.
1907
025311c4
GDR
19082013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
1909
1910 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
1911 (c_initialize_diagnostics): Call a destructor for the early printer.
1912
da6ca2b5
GDR
19132013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1914
1915 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
1916 printer initialization.
1917
318cda85 19182013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 1919
318cda85
BI
1920 PR c/57490
1921 * c-array-notation.c (fix_conditional_array_notations_1): Added a
1922 check for truth values.
1923 (expand_array_notation_exprs): Added truth values case. Removed an
1924 unwanted else. Added for-loop to walk through subtrees in default
1925 case.
1926
b066401f
GDR
19272013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
1928
1929 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
1930
fb48aadc
JM
19312013-07-23 Joseph Myers <joseph@codesourcery.com>
1932
1933 * c-parser.c (struct c_generic_association): Fix typo.
1934
433cc7b0
TT
19352013-07-23 Tom Tromey <tromey@redhat.com>
1936 Joseph Myers <joseph@codesourcery.com>
1937
1938 * c-parser.c (struct c_generic_association): New.
1939 (c_generic_association_d): New typedef.
1940 (c_parser_generic_selection): New function.
1941 (c_parser_postfix_expression): Handle RID_GENERIC.
1942
26d40c3d
JM
19432013-07-13 Jason Merrill <jason@redhat.com>
1944
1945 PR c++/57793
1946 * c-decl.c (finish_struct): Check for too-large class.
1947
ecdbd01a 19482013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
1949
1950 PR c/57821
1951 * c-typeck.c (set_init_index): When folding, check for index overflow.
1952
1141ed3f
BI
19532013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
1954
1955 * c-parser.c (c_parser_array_notation): Removed rejection of array
1956 notations in an array of function pointers.
1957
713b46fa
BI
19582013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
1959
1960 * c-array-notation.c (make_triplet_val_inv): New function.
1961 (create_cmp_incr): Likewise.
1962 (create_array_refs): Likewise.
1963 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
1964 Also modularized common parts between functions and called the function.
1965 (build_array_notation_expr): Likewise.
1966 (fix_conditional_array_notations_1): Likewise.
1967 (fix_array_notation_expr): Likewise.
1968 (fix_array_notation_call_expr): Likewise.
1969
92f20202
MP
19702013-06-18 Marek Polacek <polacek@redhat.com>
1971
1972 PR c/57630
1973 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
1974
73a23b06
BI
19752013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
1976
1977 * c-array-notation.c (build_array_notation_expr): Reject array notation
1978 mismatch between LHS and RHS even inside a call_expr. Also, removed
1979 a couple while statements that were dead code.
1980
00b8517d
BI
19812013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
1982
1983 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
1984 excessive precision expressions in function parameters. Also removed
1985 couple unwanted while statements.
1986
1509bdda
BI
19872013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
1988
1989 * c-array-notation.c (expand_array_notation_exprs): Added
1990 ARRAY_NOTATION_REF case.
1991
d60f1706
BI
19922013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
1993
1994 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
1995 function to c-family/array-notation-common.c.
1996 (is_cilkplus_reduce_builtin): Likewise.
1997 (find_rank): Likewise.
1998 (extract_array_notation_exprs): Likewise.
1999 (replace_array_notations): Likewise.
2000 (find_inv_trees): Likewise.
2001 (replace_inv_trees): Likewise.
2002 (contains_array_notation_expr): Likewise.
2003 (find_correct_array_notation_type): Likewise.
2004 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
2005 (struct inv_list): Moved this to c-family/array-notation-common.c.
2006 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
2007
6d6efbb3
BI
20082013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
2009
2010 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
2011 reduction functions outside the for-loop. Added a check if the fundecl
2012 is non-NULL. Finally, removed an unwanted if-statement, and made the
2013 body unconditional.
2014
25c22937
BI
20152013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
2016
2017 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
2018 condition of the if-statement matches the rank of else-block and then-
2019 block when array notations are used.
2020 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
2021 expression after the entire function body is parsed.
2022 (c_parser_expr_no_commas): Delayed creating array notation expressions
2023 to the end of function parsing.
2024 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
2025 whole if-statement instead of just the condition.
2026 (expand_array_notation_exprs): Added MODIFY_EXPR case.
2027
edd25645
BI
20282013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
2029
2030 PR c/57474
2031 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
2032 array to NULL_TREE if they are unused. Also added a check for the
2033 field to be NULL before its fields are used in future.
2034
065ce7f1
RO
20352013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2036
2037 PR bootstrap/57450
2038 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
2039 (build_array_notation_expr): Likewise.
2040
36536d79
BI
20412013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
2042
2043 * c-typeck.c (build_array_ref): Added a check to see if array's
2044 index is greater than one. If true, then emit an error.
2045 (build_function_call_vec): Exclude error reporting and checking
2046 for builtin array-notation functions.
2047 (convert_arguments): Likewise.
2048 (c_finish_return): Added a check for array notations as a return
2049 expression. If true, then emit an error.
2050 (c_finish_loop): Added a check for array notations in a loop
2051 condition. If true then emit an error.
2052 (lvalue_p): Added a ARRAY_NOTATION_REF case.
2053 (build_binary_op): Added a check for array notation expr inside
2054 op1 and op0. If present, we call another function to find correct
2055 type.
2056 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
2057 * c-parser.c (c_parser_compound_statement): Check if array
2058 notation code is used in tree, if so, then transform them into
2059 appropriate C code.
2060 (c_parser_expr_no_commas): Check if array notation is used in LHS
2061 or RHS, if so, then build array notation expression instead of
2062 regular modify.
2063 (c_parser_postfix_expression_after_primary): Added a check for
2064 colon(s) after square braces, if so then handle it like an array
2065 notation. Also, break up array notations in unary op if found.
2066 (c_parser_direct_declarator_inner): Added a check for array
2067 notation.
2068 (c_parser_compound_statement): Added a check for array notation in
2069 a stmt. If one is present, then expand array notation expr.
2070 (c_parser_if_statement): Likewise.
2071 (c_parser_switch_statement): Added a check for array notations in
2072 a switch statement's condition. If true, then output an error.
2073 (c_parser_while_statement): Similarly, but for a while.
2074 (c_parser_do_statement): Similarly, but for a do-while.
2075 (c_parser_for_statement): Similarly, but for a for-loop.
2076 (c_parser_unary_expression): Check if array notation is used in a
2077 pre-increment or pre-decrement expression. If true, then expand
2078 them.
2079 (c_parser_array_notation): New function.
2080 * c-array-notation.c: New file.
2081 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
2082
cd192ccc
MS
20832013-05-23 Mike Stump <mikestump@comcast.net>
2084
2085 * c-typeck.c (convert_for_assignment): Handle references to memory
2086 spaces better.
2087
427b248d
JM
20882013-05-16 Jason Merrill <jason@redhat.com>
2089
2090 * Make-lang.in (cc1$(exeext)): Use link mutex.
2091
44d90fe1
PC
20922013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
2093
2094 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
2095 to simply use OPT_Wpointer_arith.
2096 (build_unary_op): Likewise.
2097
4e7d7b3d
JJ
20982013-04-03 Jakub Jelinek <jakub@redhat.com>
2099
2100 PR c/19449
2101 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
2102 argument. If set, or it temporarily for parsing of the first
2103 argument into force_folding_builtin_constant_p.
2104 (c_parser_postfix_expression): Adjust callers.
2105
839b422f
RB
21062013-03-21 Richard Biener <rguenther@suse.de>
2107
2108 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
2109 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
2110
2ee028f1
MP
21112013-02-12 Marek Polacek <polacek@redhat.com>
2112
2113 PR c/44938
2114 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
2115 origtypes to NULL.
2116
8824edff
JJ
21172013-01-24 Jakub Jelinek <jakub@redhat.com>
2118
2119 PR c/56078
2120 * c-typeck.c (set_nonincremental_init_from_string): If
2121 constructor_max_index is NULL, treat it as if tree_int_cst_lt
2122 returned false.
2123 (process_init_element): Likewise.
2124
eadd3d0d
JJ
21252012-12-20 Jakub Jelinek <jakub@redhat.com>
2126
2127 PR c++/55619
2128 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
2129 argument, don't call default_function_array_conversion
2130 nor c_fully_fold here.
2131 (c_parser_asm_statement): Adjust callers.
2132 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
2133 and outputs here, and call default_function_array_conversion
2134 on inputs that don't need to be addressable.
2135
f8a93a2e
JJ
21362012-12-18 Jakub Jelinek <jakub@redhat.com>
2137
2138 PR c/39464
2139 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
2140 warning require that both c_common_unsigned_type as well as
2141 c_common_signed_type is the same for both mvl and mvr types.
2142
9771b263
DN
21432012-11-16 Diego Novillo <dnovillo@google.com>
2144
2145 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
2146
2147 * c-common.c: Use new vec API in vec.h.
2148 * c-common.h: Likewise.
2149 * c-gimplify.c: Likewise.
2150 * c-pragma.c: Likewise.
2151 * c-pretty-print.c: Likewise.
2152 * c-pretty-print.h: Likewise.
2153 * c-semantics.c: Likewise.
2154 * c-decl.c: Likewise.
2155 * c-parser.c: Likewise.
2156 * c-tree.h: Likewise.
2157 * c-typeck.c: Likewise.
2158
880661a4
JW
21592012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
2160
2161 PR c++/54930
2162 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
2163
077d1abe
MLI
21642012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2165
2166 PR c/53066
2167 * c-decl.c (warn_if_shadowing): Do not warn if a variable
2168 shadows a function, unless the variable is a function or a
2169 pointer-to-function.
2170
3a785c97
JJ
21712012-10-12 Jakub Jelinek <jakub@redhat.com>
2172
2173 PR c/54381
2174 * c-parser.c (struct c_tree_loc_pair): Removed.
2175 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
2176 add location_t * and tree * arguments, fill in array of 3
2177 sizeof_arg trees and corresponding locs.
2178 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
2179 c_parser_expr_list callers.
2180 (c_parser_postfix_expression_after_primary): Likewise. Pass
2181 array of 3 sizeof_arg trees and locs (corresponding to first
2182 3 arguments) to sizeof_pointer_memaccess_warning.
2183
703c8606
LC
21842012-10-09 Lawrence Crowl <crowl@google.com>
2185
2186 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
2187 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
2188 hash table.
2189
5d9de0d0
PC
21902012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
2191
2192 PR c++/54194
2193 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
2194 call.
2195
a212e43f
MG
21962012-10-09 Marc Glisse <marc.glisse@inria.fr>
2197
2198 PR c++/54427
2199 * c-typeck.c: Include c-common.h.
2200 (enum stv_conv): Moved to c-common.h.
2201 (scalar_to_vector): Moved to c-common.c.
2202 (build_binary_op): Adapt to scalar_to_vector's new prototype.
2203 * Make-lang.in: c-typeck.c depends on c-common.h.
2204
3b78de56
AC
22052012-10-04 Arnaud Charlet <charlet@adacore.com>
2206
2207 * c-decl.c (c_write_global_declarations): Fix handling of
2208 -fdump-ada-spec*.
2209
78c60e3d
SS
22102012-09-30 Sharad Singhai <singhai@google.com>
2211
2212 * c-decl.c (c_write_global_declarations): Use a different method
2213 to determine if the dump has ben initialized.
2214
9f33203d
JM
22152012-09-14 Joseph Myers <joseph@codesourcery.com>
2216
2217 PR c/54552
2218 * c-typeck.c (c_cast_expr): When casting to a type requiring
2219 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
2220 c_fully_fold first.
2221
a27d595d
JM
22222012-09-14 Joseph Myers <joseph@codesourcery.com>
2223
2224 PR c/54103
2225 * c-typeck.c (build_unary_op): Pass original argument of
2226 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
2227 any C_MAYBE_CONST_EXPR, if it has integer operands.
2228 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
2229 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
2230 to c_objc_common_truthvalue_conversion, then remove any
2231 C_MAYBE_CONST_EXPR, if they have integer operands. Use
2232 c_objc_common_truthvalue_conversion not
2233 c_common_truthvalue_conversion.
2234 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
2235 call note_integer_operands for arguments with integer operands
2236 that are not integer constants.
2237
9feb29df
JJ
22382012-09-13 Jakub Jelinek <jakub@redhat.com>
2239
2240 PR c/54559
2241 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
2242 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
2243
d409320c
JJ
22442012-08-31 Jakub Jelinek <jakub@redhat.com>
2245
2246 PR c/54428
2247 * c-convert.c (convert): Don't call fold_convert_loc if
2248 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
2249 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
2250 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
2251
6265d07c
JJ
22522012-08-24 Jakub Jelinek <jakub@redhat.com>
2253
2254 PR c/54355
2255 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
2256 for nested and empty_ok arguments in the call to
2257 c_parser_declaration_or_fndef.
2258
1a4049e7
JJ
22592012-08-17 Jakub Jelinek <jakub@redhat.com>
2260
2261 * c-tree.h (c_last_sizeof_arg): Declare.
2262 * c-parser.c (struct c_tree_loc_pair): New type.
2263 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
2264 non-NULL.
2265 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
2266 (c_parser_postfix_expression_after_primary): Likewise. Call
2267 sizeof_pointer_memaccess_warning if needed.
2268 (sizeof_ptr_memacc_comptypes): New function.
2269 * c-typeck.c (c_last_sizeof_arg): New global variable.
2270 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
2271
0229aee9
UB
22722012-07-24 Uros Bizjak <ubizjak@gmail.com>
2273
2274 * c-lang.h (lang_decl): Add variable_size GTY option.
2275
7ee2468b
SB
22762012-07-16 Steven Bosscher <steven@gcc.gnu.org>
2277
2278 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
2279 * Make-lang.in: Fix dependencies.
2280
d4a10d0a
SB
22812012-06-29 Steven Bosscher <steven@gcc.gnu.org>
2282
2283 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
2284 and add language Makefile hooks.
2285 * config-lang.in: New file.
2286 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
2287 add the required "normal" config-lang.in rules.
2288 * c-lang.h: Moved from gcc/ to here.
2289 * c-tree.h: Likewise.
2290 * c-objc-common.c: Likewise.
2291 * c-objc-common.h: Likewise.
2292 * c-typeck.c: Likewise.
2293 * c-convert.c: Likewise.
2294 * c-lang.c: Likewise.
2295 * c-aux-info.c: Likewise.
2296 * c-errors.c: Likewise.
2297 * gccspec.c: Likewise.
2298 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
2299 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
2300\f
5624e564 2301Copyright (C) 2012-2015 Free Software Foundation, Inc.
d4a10d0a
SB
2302
2303Copying and distribution of this file, with or without modification,
2304are permitted in any medium without royalty provided the copyright
2305notice and this notice are preserved.
This page took 0.984809 seconds and 5 git commands to generate.